import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long MOD = (long)Math.pow(10, 9) + 7; long[] dp = new long[(int)n + 2]; long oddsum = 0; long evensum = 0; dp[1] = 1; oddsum = 1; dp[2] = 2; evensum = 2; for(long i = 3; i < n + 1; i++) { if(i % 2 == 0) { dp[(int)i] = (i * oddsum) % MOD; evensum = (evensum + dp[(int)i]) % MOD; } else { dp[(int)i] = (i * evensum) % MOD; oddsum = (oddsum + dp[(int)i]) % MOD; } } System.out.println(dp[(int)n]); } }