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 + 1]; long[] oddsum = new long[(int)n + 1]; long[] evensum = new long[(int)n + 1]; dp[1] = 1; oddsum[1] = 1; evensum[1] = 0; dp[2] = 2; oddsum[2] = 1; evensum[2] = 2; for(long i = 3; i < n + 1; i++) { if(i % 2 == 0) { dp[(int)i] = (i * oddsum[(int)i - 1]) % MOD; oddsum[(int)i] = oddsum[(int)i - 1]; evensum[(int)i] = (evensum[(int)i - 2] + dp[(int)i]) % MOD; } else { dp[(int)i] = (i * evensum[(int)i - 1]) % MOD; oddsum[(int)i] = (oddsum[(int)i - 2] + dp[(int)i]) % MOD; evensum[(int)i] = evensum[(int)i - 2]; } } System.out.println(dp[(int)n]); } }