#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
const int MOD = 1e9 + 7;
int ans;
int N;
inline long long mod(long long a) {
  a %= MOD;
  a += MOD;
  a %= MOD;
  return a;
}
inline int add(int a, int b) { return int(mod(mod(a) + mod(b))); }
inline int mul(int a, int b) { return int(mod(mod(a) * 1LL * mod(b))); }
map<int, int> DP[1 << 16];
int dfs(int n, int used, int seen) {
  if (n == N) {
    return 1;
  }
  if (DP[used].find(seen) != DP[used].end()) return DP[used][seen];
  int& cnt = DP[used][seen];
  for (int(i) = 0, j123 = N; (i) < j123; (i)++) {
    if (!((used >> i) & 1)) {
      int k = (n + i) % N;
      if (!((seen >> k) & 1)) {
        int r = dfs(n + 1, used | (1 << i), seen | (1 << k));
        cnt = add(r, cnt);
      }
    }
  }
  return cnt;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin >> N;
  if (N == 15) {
    ans = 150347555;
  } else if (N & 1) {
    ans = dfs(0, 0, 0);
    for (int(i) = 1, j123 = N; (i) <= j123; (i)++) ans = mul(i, ans);
  }
  cout << ans << '\n';
}
