#yuki_554 n=int(raw_input()) a=[0 for i in xrange(n+1)] mod=10**9+7 even=0 odd=1 a[1]=1 for i in xrange(2,n+1): if i%2==0: a[i]=i*odd%mod even=(even+a[i])%mod else: a[i]=i*even%mod odd=(odd+a[i])%mod print a[n]