#include<iostream>
#include<cstdio>
#include<set>
#include<map>
#include<vector>
#include<cstring>
#include<string>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<iomanip>
#include<stack>
#include<cmath>

 
using namespace std;

#ifndef POJ
    #define Cpp11
#endif
 
#ifdef Cpp11
    #define _for(i,a,b) for(auto i = (a);i<(b);++i)
    #define _rep(i,a,b) for(auto i = (a);i<=(b);++i)
    #define _dep(i,a,b) for(auto i = (a);i>=(b);--i)
    #define mt(a,b,c) make_tuple(a,b,c) 
    #include<ctime>
    #include<random>
    #include<chrono>
    #include<limits>
    #include<complex>
    #include<unordered_set>
    #include<unordered_map>
    #include<cassert>
    #include<functional>
    #include<bitset>
    #define IO ios::sync_with_stdio(false);cout.tie(nullptr);cin.tie(nullptr);
#endif
 
#ifndef Cpp11
    #define _for(i,a,b) for(int i = (a);i<(b);++i)
    #define _rep(i,a,b) for(int i = (a);i<=(b);++i)
    #define _dep(i,a,b) for(int i = (a);i>=(b);--i)
    #define IO ios::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL);
#endif
 
 
using namespace std;


 
#define fr first
#define sc second
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define sci(x) scanf("%d",&(x))
#define scl(x) scanf("%lld",&(x))
#define debugline fprintf(stderr,"-----------------------\n");
#define szint(x) ((int)(x).size())


 
#ifdef I128IO
typedef __int128 SPLL;
char buff[200];
template<typename T>
void read(T& o)
{
    o = 0;
    scanf("%s",buff);
    //printf("%s\n",buff);
    T f = 1;
    int i = 0;
 
    if(buff[0]=='-')i++,f = -1;
    for(;buff[i];++i)
    {
        o*=10,o+=buff[i]-'0';
    }
    o*=f;
}
 
template<typename T>
void write(T o)
{
    int len = 0;
    buff[0] = '0';
    if(o==0)
    {
        putchar('0');
        return;
    }
    int f = 1;
    if(o<0) f = -1;
    o*=f;
    for(;o;o/=10) buff[len++] = o%10+'0';
    if(f==-1) buff[len++] = '-';
    reverse(buff,buff+len);
    buff[len++] ='\0';
    printf("%s",buff);
}
#endif
 
#ifdef FIO
char buff[100];
template<typename T>
void read(T& o)
{
    o = 0;
    scanf("%s",buff);
    //printf("%s\n",buff);
    T f = 1;
    int i = 0;
    if(buff[0]=='-')i++,f = -1;
    for(;buff[i];++i)
    {
        o*=10,o+=buff[i]-'0';
    }
    o*=f;
}
template<typename T>
void write(T o)
{
    int len = 0;
    buff[0] = '0';
    if(o==0)
    {
        putchar('0');
        return;
    }
    int f = 1;
    if(o<0) f = -1;
    o*=f;
    for(;o;o/=10) buff[len++] = o%10+'0';
    if(f==-1) buff[len++] = '-';
    reverse(buff,buff+len);
    buff[len++] ='\0';
    printf("%s",buff);
}
#endif

#define OIreader


#ifdef OIreader
inline int read(){
    char ch; bool sign=0; int res=0;
    while(!isdigit(ch=getchar()))if(ch=='-')sign=1;
    while(isdigit(ch))res=res*10+(ch^48),ch=getchar();
    if(sign)return -res; else return res;
}
#endif

#define _Random_

#ifdef _Random_
    mt19937 __MT(chrono::system_clock::now().time_since_epoch().count());
#endif
 
#ifndef BigNumber
    typedef unsigned long long uLL;
    typedef long long LL;
    typedef long long ll;
    typedef pair<LL,LL> pLL;
    typedef vector<LL> vL;
    typedef vector<vL> vLL;
#endif

typedef vector<int> vi;
typedef vector<vi > vii;
typedef pair<int,int> pii;



const int maxn = 1000000+10;
const int maxm = 21;
const int maxb = 20+10;
const int apsz = 62;
const int inf = 1e9;
const int mod = 1e9+7;

// Think And Code.Just for fun,and also for dream


inline int mul(int a,int b){return 1LL*a*b%mod;}
inline int add(int a,int b)
{
    a+=b;
    if(a>=mod) a-=mod;
    else if(a<0)a+=mod;
    return a;
}

inline int fpow(int a,int b)
{
    int ans(1);
    for(;b;)
    {
       if(b&1) ans = mul(ans,a);
       b>>=1;
       a = mul(a,a); 
    }
    return ans;
}


int fac[maxn],invfac[maxn],inv[maxn];

inline void init()
{
    fac[0]++;
    _for(i,1,maxn) fac[i] = mul(fac[i-1],i);
    int now = fpow(fac[maxn-1],mod-2);
    _dep(i,maxn-1,1)
    {
        inv[i] = mul(fac[i-1],now);
        now = mul(now,i);
    }
    invfac[0]++;
    _for(i,1,maxn) invfac[i] = mul(invfac[i-1],inv[i]);
}

inline int C(int a,int b)
{
    if(a<0||b<0||a<b)return 0;
    return mul(fac[a],mul(invfac[b],invfac[a-b]));
}



int n;


inline int solve()
{
    int ans = 0;
    inv[0] = 1;
    _rep(m,1,n)
    {
        if(m&1) continue;
        int now = mul(add(C(m-1,n-m-1),C(m,n-m)),2);
        now = mul(now,fac[m]);
        ans = add(ans,now);
    }
    return ans;
}

int main(void)
{
    sci(n);
    init();
    printf("%d\n",solve());
    return 0;
}
