题目描述
Problem Description
Windy has learned a new game.
For the numbers 1 to N, each has a unique and different number from 1 to N corresponding to it.
Initially, Windy writes the numbers in order from 1 to N in a row on a piece of paper.
Then, he writes the corresponding numbers below this row.
He repeats this process with the new row, writing the corresponding numbers below it.
This continues until the sequence returns to 1, 2, 3, ..., N.
For example:
1 2 3 4 5 6
The corresponding relationships are:
1->2 2->3 3->1 4->5 5->4 6->6
Windy's operations are as follows:
1 2 3 4 5 6
2 3 1 5 4 6
3 1 2 4 5 6
1 2 3 5 4 6
2 3 1 4 5 6
3 1 2 5 4 6
1 2 3 4 5 6
At this point, we have several rows of permutations from 1 to N, with 7 rows in the example above.
Now, Windy wants to know, for all possible corresponding relationships, how many possible row counts there are.
Input Format
A single integer, N.
Output Format
A single integer, the number of possible row counts.
Sample Input and Output
Sample Input #1
3
Sample Output #1
3
Sample Input #2
10
Sample Output #2
16
Notes
30% of the data satisfies 1 <= N <= 10.
100% of the data satisfies 1 <= N <= 1000.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分