Sequence#3648

Sequence

1 second
128 megabytes
Easy

Consider the segment, at the ends of which ones are written. Then till infinity we shall do the next procedure: for each segment with ends and (inside which the numbers are absent) we shall write in the middle the number a + b. So from the starting segment

prb3648-01

we get

prb3648-02

Then we get the segment

prb3648-03

and so on till infinity. How many times the positive integer will be written on a segment?

Input

One positive integer (n \leq 10^{13}).

Output

The number of times the number appears on a segment.

Examples

Example 1

Loading
Loading