Alice and candies
Basic programming
Number theory
Basic number theory 1
Math
Number theory
88.0% success
16,127 attempts
1s time
256MB memory
1024KB max code

Alice loves candies, so she went into a candy shop. Now the shopkeeper sells candies in packets and all packets contain an odd number of candies (1, 3, 5, 7.....). Alice wants exactly \(N\) candies but she also loves patterns so she decided to buy candies only if the number of candies in the packets is consecutive and distinct (means she cannot buy the same candy packet more than once) and the sum of all the candies in those packets is exactly \(N\).

Alice has an infinite amount of money and the shopkeeper also has infinite amount candy packets, so Alice wonders how many different sets of candy packets she can buy.

Find the number of different sets of candy packets that Alice can buy.

Input format

The first and the only line contains a single integer \(N\ (1 \le N \le 1000000000)\).

Output format

Print a single integer denoting the number of different sets of candy packets Alice can buy.

Examples
Input
45
Output
3
Explanation

Exaplanation: Lola can buy 3 set of candy packets.

1. {5,7,9,11,13}

2.{13,15,17}

3.{45}

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading Editor...