The sum of (p > 0) consecutive integers can often be expressed as the sum of the next consecutive positive integers. For example:
9 + 10 + 11 + 12 = 13 + 14 + 15, here p = 4 and q = 3
4 + 5 + 6 + 7 + 8 = 9 + 10 + 11, here p = 5 and q = 3
Given the value of , find the number of possible values of .
Contains at most lines. Each line contains a positive integer less than 10^{14}, which denotes the value of . Input is terminated by a line containing a single zero. This line should not be processed.
For each input line, print one line containing an integer, which denotes the number of possible values of .
Esempio 1