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