n=int(input()) R={1:1,2:2,3:6} def f(x): if x==1:return R[1] k=0 if x%2==0: for y in range(1,x,2):k+=R[y] else: for y in range(2,x,2):k+=R[y] R[x]=k*x%(10**9+7) return R[x] for i in range(1,n):f(i) # print(i,f(i)) print(f(n)%(10**9+7))