407246: GYM102709 B Office Hours
Description
Deja has been battling with a frustrating race condition on her cooperative multithreading assignment in her operating systems class. She decides to go to the TA's zoom office hours the day before the assignment is due and finds a lot of her peers in the same predicament! The TA is overwhelmed and informs the $$$n$$$ students in the call to remember what order that they joined the call in so that the TA can answer their questions in that order. Deja was so preoccupied with her perplexing bug that she forgot where exactly in the queue of students that she was. She does know, however, that there were at least $$$x$$$ people ahead of her and no more than $$$y$$$ students behind her. Help Deja figure out how many different positions in the queue that she could be at.
InputThere is only one line of input which contains three space-separated integers, $$$n$$$, $$$x$$$, and $$$y$$$ ($$$1 \leq x, y < n \leq 1,000,000$$$)
OutputOutput a single integer representing the number of different positions in the queue Deja could be at. It is guaranteed that there will be at least one valid position for Deja to be at.
ExamplesInput4 2 1Output
2Input
6 1 3Output
4Note
In the first sample, Deja could be at positions $$$3$$$ or $$$4$$$ (if the positions are one-indexed) and this would ensure that she has at least two people in front of her and at most one person after her.
Similar logic means that for the second sample, she could be at positions $$$3$$$, $$$4$$$, $$$5$$$, and $$$6$$$ (again one-indexing the positions).