Problem O
Chair Hopping

The latest hit song Chair Hopping
contains instructions for a group dance. To perform the dance,
When a single hop is performed, the
performer currently seated in chair
Exactly two hops have been completed and now performer
Input
The first line of the input contains the integer
Output
Output the number of ways in which the values of
Sample Input 1 | Sample Output 1 |
---|---|
2 1 2 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
5 3 4 5 1 2 |
1 |
Sample Input 3 | Sample Output 3 |
---|---|
16 7 16 11 1 8 2 4 5 10 14 3 15 12 9 13 6 |
92 |