#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,k) for(int i=(j);i<=(k);i++)
#define per(i,j,k) for(int i=(j);i>=(k);i--)
#define ll long long 
const int N=1014514;
const int md=1e9+7;
ll as,fc[N],iv[N];
int n;
ll msk(ll a,int b,ll k=1){while(b){if(b&1)k=k*a%md;b>>=1;a=a*a%md;}return k;}
ll C(int x,int y){return fc[x]*iv[y]%md*iv[x-y]%md;}
int main(){scanf("%d",&n);fc[0]=iv[0]=1;
	rep(i,1,n)fc[i]=fc[i-1]*i%md;iv[n]=msk(fc[n],md-2);
	per(i,n-1,1)iv[i]=iv[i+1]*(i+1)%md;if(n%2==0)as=fc[n];
	rep(i,1,(n+1)/2)if(i%2==n%2){
		as=(as+(C(n-i,i)+C(n-i-1,i-1))%md*fc[n-i])%md;
	}printf("%lld",2*as%md);
}