n = int(input()) P = 10 ** 9 + 7 a = [0] * (n+1) a[1] = 1 odd = 1 even = 0 for i in range(2,n+1): if i % 2 == 0: a[i] = i * odd % P even = (even + a[i]) % P else: a[i] = i * even % P odd = (odd + a[i]) % P print(a[-1])