5271: ABC161——Task F:Division or Substraction
[Creator : ]
Description
Given is a positive integer N.
We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K.
We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K.
- Operation: if K divides N, replace N with N/K; otherwise, replace N with N−K.
Input
Input is given from Standard Input in the following format:
N
Output
Print the number of choices of K in which N becomes 1 in the end.
Sample 1 Input
6
Sample 1 Output
3