#include #include #include #include #include #include #include #include #include #include #include #include #include #define p(s) cout<<(s)<=n;i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define F first #define S second typedef long long ll; using namespace std; const ll mod=1e9+7; int N; vector> vt; ll a[100010]; ll eo[2]; int main(){ cin>>N; if(N==1) { p(1); return 0; } a[1]=1; eo[0]=N; REP(i,2,N){ a[i] = eo[i%2]*i; a[i] %= mod; eo[(i+1)%2] += a[i]; eo[(i+1)%2] %= mod; } p(eo[N%2]); return 0; }