#t333. 数的计算(count)

数的计算(count)

Counting Numbers

Problem Background

Special for beginners, ^_^

Problem Description

We want to count how many numbers (including the input natural number nn) satisfy the following property. First read a natural number n  (n≤1000)n\;(n \le 1000), then process it as follows:

  1. Do nothing to it;
  2. Add a natural number to its left, but this natural number must not exceed half of the original number;
  3. After adding the number, keep applying this rule until no more natural number can be added.

Input Format

One natural number n  (n≤1000)n\;(n\le 1000).

Output Format

One integer: the count of numbers that satisfy the property.

Sample Input

6

Sample Output

6

Constraints

1s, 1024KiB for each test case.

Hint

The numbers that satisfy the property are:

6,  16,  26,  126,  36,  1366,\;16,\;26,\;126,\;36,\;136.