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 even += a[i]%mod else: a[i] = i*even odd +=a[i]%mod print(a[N]) main()