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