402836: GYM100917 C Constant Ratio

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Constant Ratiotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Given an integer n, find out number of ways to represent it as the sum of two or more integers ai with the next property: ratio ai / ai - 1 is the same positive integer for all possible i > 1.

Input

Input consists of one integer n (1 ≤ n ≤ 105).

Output

Print one integer — number of representations.

ExamplesInput
1
Output
0
Input
5
Output
2
Input
567
Output
21
Note

In the first sample no such representation exists.

In the second sample there exist two representations:

  • 1 1 1 1 1, then q = 1.
  • 1 4, then q = 4.

加入题单

算法标签: