n=int(input()) R={0:0,1:1} Z=[0,1] for i in range(2,n+1): c=i%2 R[i]=Z[c==0]*i%(10**9+7) Z[c!=0]+=R[i] print(R[n])