In a circular stadium with a circumference of meters, there are n-1 horses racing. Each horse is numbered from to n-1 inclusive. The -th horse starts meters from the starting line, in the direction of the race, and runs i^2 meters. A horse is deemed successful if it finishes exactly at the starting line.
Determine how many horses are successful for a given .
The input consists of a single line containing the integer (3 \leq n \leq 10^{18}), which represents the circumference of the stadium.
Output a single integer — the number of successful horses.
Example 1