Contrary to common belief, Koalas are very socially active. Ken Koala has been on many matchmaking sites, and is now interested in making his own matchmaking algorithm. Ken's algorithm takes in a koala's favourite number, , and chooses an optimal integer such that the average of and , denoted by , is an integer and is maximal. The Koala with favourite number will be matched with a Koala with favourite number .
Given the inputted value of , you are to find the value of the integer, .
Constraints
Input Specification
The input will contain an integer .
Output Specification
Output the value of the integer .
Sample Input
15
Sample Output
14
Explanation for Sample
The optimal to choose is , resulting in an average of .
Comments
I don't understand, what is X?
The 3 variables are X, N, and A. N is the input, A is the output. Whats X?
X is the value that you add to N. You have to find the maximum value for A. And A = (X + N) / 2. Where X < N.
Hopefully this helps!