Problem Statement
You are given integers $X, L, R$. Among the integers between $L$ and $R$, inclusive, output the one whose absolute difference with $X$ is the smallest. It can be proved that there is exactly $1$ such integer.
Constraints
- $1 \le X \le 100\,000$.
- $1 \le L \le R \le 100\,000$.
Input
The input is given from Standard Input in the following format:
X L R
Output
Among the integers between $L$ and $R$, inclusive, output the one whose absolute difference with $X$ is the smallest.
Sample 1
Input
8 3 6
Output
6
Among $3, 4, 5, 6$, the one with the smallest absolute difference with $8$ is $6$. Therefore, output $6$.
Sample 2
Input
7 3 10
Output
7
Among $3, 4, 5, 6, 7, 8, 9, 10$, the one with the smallest absolute difference with $7$ is $7$. Therefore, output $7$.
Sample 3
Input
8 10 10
Output
10