def main(): N = int(input()) mod =1000000007 a = [0]*(N+10) a[1] = 1 even,odd = 0,1 for i in range(2,N+1): if i%2==0: a[i] = i*odd%mod even += a[i] else: a[i] = i*even%mod odd +=a[i] print(a[N]) main()