#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#define LL long long
#define FOR(i,A,B) for(LL i=A;i<=B;i++)
#define BOR(i,A,B) for(LL i=A;i>=B;i--)
using namespace std;
const int MaxN=3e7+10;
const LL Mod=1e9+7,Temp=500000004;
LL Inv[MaxN]={1};
LL Fac=1,Ans,Two=1,Tot;
int Total;
inline LL Fast(LL A,LL B) {
LL Res=1;
while(B) {
if(B & 1) Res=(Res*A)%Mod;
A=(A*A)%Mod; B>>=1;
}
return Res;
}
int main() {
scanf("%d",&Total);
if(Total==1) { cout<<"0"<<endl; return 0; }
FOR(i,1,Total) Two=Two*2%Mod,Fac=Fac*i%Mod;
Tot=Fac*Fast(Total,Mod-2)%Mod;
Inv[Total]=Fast(Fac,Mod-2);
BOR(i,Total-1,0) { Inv[i]=Inv[i+1]*(i+1)%Mod; }
BOR(i,Total,0) {
Ans=(Ans+Tot*Two%Mod*1ll*Inv[i]%Mod*Inv[Total-i]%Mod*(i & 1 ? -1 : 1))%Mod;
Two=Two*Temp%Mod;
Tot=Tot*(2*Total-i)%Mod;
}
Ans=(Ans+Mod)%Mod;
Ans=Ans*Fac%Mod;
printf("%lld\n",Ans);
return 0;
}