Problem9704--ABC190 —— D - Staircase Sequences

9704: ABC190 —— D - Staircase Sequences

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

How many arithmetic progressions consisting of integers with a common difference of $1$ have a sum of $N$?

Input

Input is given from Standard Input in the following format:

```
$N$
```

Output

Print the answer.

Constraints

-   $1 ≤ N ≤ 10^{12}$
-   $N$ is an integer.

Sample 1 Input

12

Sample 1 Output

4

We have four such progressions:

  • [12]
  • [3,4,5]
  • [−2,−1,0,1,2,3,4,5]
  • [−11,−10,−9,…,10,11,12]

Sample 2 Input

1

Sample 2 Output

2

We have two such progressions:

  • [1]
  • [0,1]

Sample 3 Input

963761198400

Sample 3 Output

1920

Source/Category