package yukicoder; import java.util.Scanner; public class No554 { private int n; private long[] a; private long sumtmp; public static void main(String[] args) { No554 main = new No554(); main.run(); } private void run() { Scanner sc = new Scanner(System.in); n = sc.nextInt(); a = new long[n + 1]; a[1] = 1; for(int i = 2; i < a.length; i++) { if(i % 2 == 1) { //a[i] = odd(i); sumtmp = 0; for(int j = 2; j < i; j += 2) { sumtmp += a[j]; } a[i] = i * sumtmp % 1000000007; } else { //a[i] = even(i); sumtmp = 0; for(int j = 1; j < i; j += 2) { sumtmp += a[j]; } a[i] = i * sumtmp % 1000000007; } } System.out.println(a[n] % 1000000007); } }