import java.util.*; public class Main { static final int MOD = 1000000007; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if (n == 1) { System.out.println(1); return; } long evTotal = 0; long odTotal = 1; long x = 0; for (int i = 2; i <= n; i++) { if (i % 2 == 0) { x = odTotal * i % MOD; evTotal += x; evTotal %= MOD; } else { x = evTotal * i % MOD; odTotal += x; odTotal %= MOD; } } System.out.println(x); } }