#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int,int> pii;
typedef vector<int> vii;
typedef vector<pii> vpii;
typedef unordered_map<int,int> umap;
typedef long double ld;
#define fi first
#define se second
#define pb push_back
#define mp make_pairNa
#define popcount __builtin_popcount
#define case cout<<"Case "<<z-t<<": ";
#define mod (ll)(1e9+7)
const int N=1000001;
ll fact[N],inv[N];
ll modulas(ll a,ll n=mod-2){
    if(n==0) return 1;
    ll ans=modulas(a,n/2);
    ans=(ans*ans) %mod;
    if(n%2) ans=ans*a %mod;
    return ans;
}
inline ll comb(int n,int k){
    if(n<k || k<0) return 0;
    //cout<<n<<" "<<k<<endl;
    return (inv[k]*inv[n-k] %mod)*fact[n] %mod;
}
inline ll state(int n,int k){
    return (comb(n-k-1,k-1)+comb(n-k,k))%mod;
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n,m,i,j,k;
    cin>>n;
    fact[0]=inv[0]=1;
    for(i=1;i<N;i++){
        fact[i]=fact[i-1]*i %mod;
        inv[i]=modulas(fact[i]);
    }
    ll ans=0;
    for(i=n%2;i<=n;i+=2){
        k=2*state(n,i) %mod;
        //cout<<k<<endl;
        m=n-i;
        k=k*fact[m] %mod;
        ans=(ans+k)%mod;
    }
    cout<<ans<<endl;
}

