Guess Number Higher Or Lower
easy
1. We are playing the Guess Game. The game is as follows: 2. I pick a number from 1 to n. You have to guess which number I picked. 3. Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess. 4. You call a pre-defined API int guess(int num), which returns 3 possible results: a) -1: The number I picked is lower than your guess (i.e. pick < num). b) 1: The number I picked is higher than your guess (i.e. pick > num). c). 0: The number I picked is equal to your guess (i.e. pick == num). 5. Return the number that I picked.
Constraints
1 <= n <= 231 - 1 1 <= pick <= n
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
10 6
Sample Output
6