#include <bits/stdc++.h>
using namespace std;

#define FOR(i,l,r) for(int i = int(l);i < int(r);i++)
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;

int N;
const int MAX_N = 100000;
ll accOdd [MAX_N + 17],accEven [MAX_N + 17];
ll A [MAX_N + 17];
const ll MOD = 1e9 + 7;

int main()
{
	scanf("%d",&N);
	A [1] = 1;
	accOdd [2] = 1;
	FOR(i,2,N + 1){
		if(i % 2 == 0){
			A [i] = accOdd [i] * i % MOD;
			accOdd [i + 1] = accOdd [i];
			accEven [i + 1] = (accEven [i] + A [i]) % MOD;
		}
		else{
			A [i] = accEven [i] * i % MOD;
			accOdd [i + 1] = (accOdd [i] + A [i]) % MOD;
			accEven [i + 1] = accEven [i];
		}
	}
	
	printf("%lld\n",A [N]);

	return 0;
}