N = int(input()) mod = 10 ** 9 + 7 if N == 1: print(1) exit() odd = 1 even = 0 for i in range(2, N + 1): if i % 2 == 0: a = i * odd % mod even += a even %= mod else: a = i * even % mod odd += a odd %= mod print(a)