"Title description"
An n's full permutation a[i] is a single-peak, when and only if there is an X that makes A[1]<a[2]<...<a[x]>a[x+1]>...>a[n].
For example, for a 9 full arrangement, 125798643 is a single-peak arrangement, and 123456789 is a single-peak arrangement, but 356298741 is not.
Try to find the number of a single peak of N.
"Input Format"
An integer n
"Output Format"
The total number of single-peak permutations.
Because the result can be large, output the result to 1234567 after the modulo.
"Sample Input"
3
"Sample Output"
4
"Data Range"
1<=n<=2000000000
Analysis
First, be clear: n must be the highest point of the "peak", followed by n-1,n-2,...,1. Among them, n-1 this number can be placed on the left of the "mountain", can also be placed on the right of the "mountain", and then n-2 is also so ... Until 1, there are two kinds of placement schemes, so the final result is 2^n-1.
Only know that this is not enough, if the loop to find the time, so the use of fast power or divide the solution, the following code is divided.
var
n:longint;
function FCT (x:longint): Qword;
Begin
If X=0 then exit (1);
If X=1 then exit (2);
FCT:=SQR (FCT (x Div 2)) mod 1234567;
If x mod 2<>0 then fct:=fct*2 mod 1234567;
End;
Begin
Read (n);
Write (FCT (n-1));
End.