Consider a hidden vector with integer numbers in strictly increasing order. Given an integer that belongs to , you will play a game to guess the position where . You have to use a “black box” , with parameters and a position inside . If there is a such that , you win the game. Otherwise, will tell you whether or .
Given , what is the minimum number of calls to to win the game?
Input consists of several cases, each one with an between 1 and .
For every , print the worst-case number of calls to to win the game, assuming a strategy that minimizes that worst-case cost.
Input
1 2 4 9 10 1000000000000000
Output
1 1 2 2 3 49