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