Time limit
2s
Memory limit
128 MB
There are N students with distinct heights. Number 1 is the shortest student and number N is the tallest student. Arrange all students in one line, using each student exactly once.
Any student may stand in the first position, and any remaining student may stand in the second position. From the third position onward, the next student's height is determined by comparing the previous two students.
In other words, the comparison between adjacent students must alternate at every position. For N = 5, arrangements such as 1 - 3 - 2 - 5 - 4 and 3 - 2 - 5 - 1 - 4 satisfy the condition.
Find the number of valid ways to arrange the N students.
The first line contains the number of students N. (1 <= N <= 100)
Print the number of valid arrangements modulo 1,000,000.