#t18. 计算兔子繁殖到N对所需最少月份
计算兔子繁殖到N对所需最少月份
Minimum Months for Rabbits to Reach N Pairs
Problem Description
A pair of rabbits, starting from the rd month after birth, gives birth to one pair of rabbits every month. A baby rabbit, after it grows to the rd month, also gives birth to one pair every month. Suppose no rabbit ever dies — for the pair of rabbits born in the st month, at least in which month will the total number of rabbits reach pairs?
Input Format
The input gives one positive integer not exceeding on one line.
Output Format
Output on one line the minimum number of months needed for the total number of rabbits to reach .
Sample Input
30
Sample Output
9
Constraints