#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<n;++i)
#define repn(i,n) for(int i=1;i<=n;++i)
#define LL long long
#define pii pair <int,int>
#define pb push_back
#define fi first
#define se second
#define mpr make_pair

using namespace std;

const LL MOD=1e9+7;

LL qpow(LL x,LL a)
{
	LL res=x,ret=1;
	while(a>0)
	{
		if((a&1)==1) ret=ret*res%MOD;
		a>>=1;
		res=res*res%MOD;
	}
	return ret;
}

LL n,fac[1000010],inv[1000010],ans=0;

LL C(LL nn,LL mm){return fac[nn]*inv[mm]%MOD*inv[nn-mm]%MOD;}

LL CC(LL nn,LL mm)//nn个物品插mm个板
{
  if(mm<0) return 0;
  if(mm==0) return 1;
  if(nn-1<mm) return 0;
  return C(nn-1,mm);
}

int main()
{
  fac[0]=1;
  repn(i,1000005) fac[i]=fac[i-1]*(LL)i%MOD;
  rep(i,1000005) inv[i]=qpow(fac[i],MOD-2);
  cin>>n;
  for(LL i=n%2;i<=n/2;i+=2)
  {
    LL res=0,tmp=CC(n-i,i-1)*2%MOD;
    res=tmp;//0,n-1有一个不选
    res=(res+CC(n-i,i))%MOD;//0,n-1都选
    res=(res+res)%MOD;
    res=res*C(n-i,(n-i)/2)%MOD*fac[(n-i)/2]%MOD*fac[(n-i)/2]%MOD;
    ans=(ans+res)%MOD;
  }
  cout<<ans<<endl;
	return 0;
}