Problem1519--Counting the number

1519: Counting the number

[Creator : ]
Time Limit : 1 sec  Memory Limit : 500 MB

Description

DescriptionWe need to find out the number of numbers with the following properties (including the natural number NN of input).

First enter a natural number n~ (n\le 1000) n (n = 1000), and then deal with the natural number according to the following methods:

1. No treatment;

2. add a natural number to its left side, but the natural number can not exceed half of the original number.

3. after adding the number, continue to follow this rule until no natural number can be added.

Input

InputA natural number

Output

OutputMeet the condition number of the number

Sample Input Copy

6
10 

Sample Output Copy

6
14

Source/Category

vijos