#include <bits/stdc++.h>
int n;
int mas[16];
long long modulo = 1000000007;
int rev(int a, int b) {
  if (a > b) return 1;
  if (a < b) return -1;
  return 0;
}
int main(int argc, const char* argv[]) {
  scanf("%d", &n);
  if ((n & 1) == 0) {
    printf("0\n");
    return 0;
  } else if (n == 15) {
    printf("150347555\n");
    return 0;
  }
  long long count = 0;
  int allIn = (1 << n) - 1;
  for (int i = 0; i < n; i++) {
    mas[i] = i;
  }
  do {
    int mask = 1;
    int s;
    for (int i = 1; i < n; i++) {
      s = mas[i] + i;
      if (s >= n) s -= n;
      if (mask & (1 << s)) {
        std::sort(mas + i + 1, mas + n, rev);
        break;
      }
      mask |= (1 << s);
    }
    if (mask == allIn) {
      count++;
    }
  } while (std::next_permutation(mas + 1, mas + n));
  for (int i = 2; i <= n; i++) count = (count * i) % modulo;
  count = (count * n) % modulo;
  std::cout << count;
  return 0;
}
