Consecutive sum

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 1868
64-bit integer IO format: %I64d      Java class name: Main

Description

Every body knew that 15 = 1+2+3+4+5 = 4+5+6 = 7+8. Now give you a number N, tell me how many ways to represent N as a sum of consecutive positive integers. For example, 15 have 3 ways to be found.

Input

Each line will contain an signed 32-bits integer N. Process to end of file.

Output

For each case, output the answer in one line.

Sample Input

15
1050

Sample Output

3
11

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .