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(); long odSum = 1; long evSum = 0; long num = 1; for (int i = 2; i <= n; i++) { if (i % 2 == 0) { num = (odSum * i) % MOD; evSum += num; evSum %= MOD; } else { num = (evSum * i) % MOD; odSum += num; odSum %= MOD; } } System.out.println(num); } }