Bucks in the Bank
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Papa Carlo gave Buratino 1 dollar on his first birthday, which Buratino wisely deposited in the bank. Each following year, Papa Carlo doubled the amount he gave the previous year and added a number of dollars equal to Buratino's age. Buratino continued to deposit all the money in the bank. On which birthday, denoted as N
, will the total amount in the bank reach at least S
dollars?
Input
A single number, S
, where 1 ≤ S ≤ 2^40
.
Output
The required value of N
.
Examples
Input #1
Answer #1
Submissions 18K
Acceptance rate 23%