import java.math.BigDecimal; import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; import java.util.TreeSet; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int n = sc.nextInt(); long[] values = new long[n + 1]; values[1] = 1; long odd = 1, even = 0; for(int i = 2; i <= n; i++){ if(i % 2 == 0){ final long next = (odd * i) % MOD; even += next; values[i] = next; }else{ final long next = (even * i) % MOD; odd += next; values[i] = next; } } System.out.println(values[n]); } }