n = int(input()) a = [0]*(n+1) a[1]= 1 accodd = 1 acceven = 0 MOD = 10**9+7 for i in range(2,n+1): if i%2==0: a[i] = i*accodd%MOD acceven += a[i] else: a[i] = i*acceven%MOD accodd += a[i] print(a[n]%MOD)