package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long alpha[], beta[], tmp; alpha = new long[n]; beta = new long[n]; String flag; if (n < 3){ System.out.print(0); }else{ alpha[0] = 4; alpha[1] = 2; flag = "alpha"; for (int i = 3; i < n; i++){ if (flag == "alpha"){ for (int j = 0; j < Math.min(i-1,n/2+1); j++){ tmp = alpha[j]; beta[j] = 2 * tmp; } for (int j = 0; j < Math.min(i-1,n/2+1); j++){ tmp = alpha[j]; if (j > 0){beta[j-1] += tmp * j;} beta[j+1] += tmp * (i - 1 - j); } flag = "beta"; }else{ for (int j = 0; j < Math.min(i-1,n/2+1); j++){ tmp = beta[j]; alpha[j] = 2 * tmp; } for (int j = 0; j < Math.min(i-1,n/2+1); j++){ tmp = beta[j]; if (j > 0){alpha[j-1] += tmp * j;} alpha[j+1] += tmp * (i - 1 - j); } flag = "alpha"; } if (flag == "alpha") { for (int j = 0; j < n; j++) { alpha[j] = alpha[j] % 1000000007 ; } }else{ for (int j = 0; j < n; j++) { beta[j] = beta[j] % 1000000007; } } } if (flag == "alpha") { System.out.println(alpha[0] % 1000000007); }else{ System.out.println(beta[0] % 1000000007); } } } }