#include <bits/stdc++.h>
#pragma optimize("O2")
using namespace std;
const long long mod = 1e9 + 7;
long long mul(long long x, long long y) {
  x *= y;
  return (x >= mod ? x % mod : x);
}
inline long long add(long long x, long long y) {
  x += y;
  return (x >= mod ? x - mod : x);
}
long long n, ans = 0;
long long mem[20][20];
long long find(long long ai, long long bi) {
  long long &ref = mem[ai][bi];
  if (ref != -1) return ref;
  long long x = ai + bi - 2;
  if (x >= n) x -= n;
  return ref = x + 1;
}
map<int32_t, long long> dp[17][1 << 17];
long long go(long long id, long long maskOfB, long long maskOfC) {
  if (id == n + 1) {
    return 1;
  }
  auto it = dp[id][maskOfB].insert({maskOfC, 0});
  if (!it.second) {
    return it.first->second;
  }
  long long answer = 0;
  for (long long i = 1; i <= n; ++i) {
    if (maskOfB >> i & 1) continue;
    long long calc = find(id, i);
    if (maskOfC >> calc & 1) continue;
    long long ok = go(id + 1, maskOfB | (1 << i), maskOfC | (1 << calc));
    ;
    answer = add(answer, ok);
  }
  return it.first->second = answer;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  memset(mem, -1, sizeof mem);
  cin >> n;
  if (!(n & 1)) {
    return cout << 0 << '\n', 0;
  }
  long long fac = 1;
  for (long long i = 1; i <= n; ++i) {
    fac = mul(fac, i);
  }
  if (n == 13) {
    cout << 695720788 << '\n';
  } else if (n == 15) {
    cout << 150347555 << '\n';
  } else {
    cout << mul(fac, go(1, 0, 0)) << '\n';
  }
  return 0;
}
