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); j++){ tmp = alpha[j]; beta[j] = 2 * tmp; } for (int j = 0; j < Math.min(i-1,n/2); 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); j++){ tmp = beta[j]; alpha[j] = 2 * tmp; } for (int j = 0; j < Math.min(i-1,n/2); j++){ tmp = beta[j]; if (j > 0){alpha[j-1] += tmp * j;} alpha[j+1] += tmp * (i - 1 - j); } flag = "alpha"; } } if (flag == "alpha") { System.out.println(alpha[0] % 1000000007); }else{ System.out.println(beta[0] % 1000000007); } } } }