#include <iostream>
using namespace std;
// 奇+偶=奇
// 奇数排列组合数*偶数排列组合数即为答案
// n为奇数,则只有奇开头
// n为偶数,则可以偶数开头也可以奇数开头,结果*2
int main() {
    int n;
    cin >> n;
    int oddCnt = n/2;
    int evenCnt = oddCnt;
    if(n%2) {
        evenCnt++;
    }
    int64_t total = 1;
    const int64_t mod = 1e9+7;
    for(auto i = 2; i <= oddCnt; i++)  {
        total *= i;
        total %= mod;
    }
    for(auto i = 2; i <= evenCnt; i++)  {
        total *= i;
        total %= mod;
    }
    if(n%2==0) {
        total *=2;
        total %= mod;
    }
    cout << total << endl;
}
// 64 位输出请用 printf("%lld")