MOD = 10 ** 9 + 7 def main(): n = int(input()) a = [0] * (n + 1) a[1] = 1 even = 0 odd = 1 for i in range(2, n+1): if i % 2 == 0: a[i] = i * odd % MOD even += a[i] elif i % 2 != 0: a[i] = i * even % MOD odd += a[i] print(a[n]) main()