import std.experimental.all; T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int; ulong calc(int n) { const mod = 1_000_000_007; auto a = new int[n + 1]; a[1] = 1; auto sum = [0L, 1L]; // sum[0] = a2 + a4 + a6 + ... // sum[1] = a1 + a3 + a5 + ... for (int i = 2; i <= n; i++) { a[i] = i * sum[(i - 1) % 2] % mod; sum[i % 2] += a[i]; } return a[n]; } void main() { int n = readint(); writeln(calc(n)); }