#include <iostream>
using namespace std;
const int mod = 1000000007;
int nya[100001];
int main(){
    nya[0] = 1;
    int eve = 0;
    int odd = 1;
    int n;cin>>n;
    for(int i = 1; n > i; i++){
        if(i%2){
            nya[i] = (odd*(i+1))%mod;
            eve = (eve+nya[i])%mod;
        }else{
            nya[i] = (eve*(i+1))%mod;
            odd = (odd+nya[i])%mod;
        }
    }
    cout << nya[n-1] << endl;
    
}