n = int(input()) MOD = 10 ** 9 + 7 even_acc, odd_acc = 0, 1 for i in range(2, n+1): if i == n: if i % 2 == 0: print(i * odd_acc % MOD) else: print(i * even_acc % MOD) exit() if i % 2 == 0: even_acc += i * odd_acc even_acc %= MOD else: odd_acc += i * even_acc odd_acc %= MOD