import java.util.*; import java.lang.*; import java.io.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int mod = 1000000007; int n = sc.nextInt(); long odd = 0l; long even = 0l; long[] as = new long[n+1]; as[1] = 1l; odd = 1l; for (int i=2; i<=n; i++) { if (i % 2 == 0) { as[i] = (i * odd) % mod; even += as[i]; }else{ as[i] += (i * even) % mod; odd += as[i]; } } System.out.println(as[n] % mod); } }