#include <bits/stdc++.h>

using namespace std;

#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'

typedef long long ll;

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fll;

const int MOD = 1e9+7, MAX = 1e6+10;

ll fat[MAX], ifat[MAX];

ll c(int n, int k) {
	if (k < 0) return 0;
	return fat[n] * ifat[k] % MOD * ifat[n-k] % MOD;
}

int main() { _
	fat[0] = 1;
	for (int i = 1; i < MAX; i++) fat[i] = i * fat[i-1] % MOD;
	ifat[MAX-1] = 238460277;
	for (int i = MAX-2; i >= 0; i--) ifat[i] = (i+1) * ifat[i+1] % MOD;

	int n; cin >> n;
	ll ans = 0;
	int ini = (n+1)/2;
	if (ini%2) ini++;
	for (int x = ini; x <= n; x += 2) ans += 2 * fat[x] * (c(x, n-x) + c(x-1, n-x-1)) % MOD;
	cout << ans % MOD << endl;
	exit(0);
}
