#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>

using namespace std;

int cnt(vector<int> a)
{
    int ans = 0, n = a.size();
    for (int i = 0; i < n; i++)
        for (int j = i + 1; j < n; j++)
            ans += (a[i] > a[j]);
    return ans;
}

int main()
{
    freopen("victory.in", "r", stdin);
    freopen("victory.out", "w", stdout);
    int n;
    cin >> n;
    int ans = n > 1 ? 0 : 1;

    vector<int> a(n);
    for (int i = 0; i < n; i++)
        a[i] = i;

    while (next_permutation(a.begin(), a.end()))
    {
        vector<int> b = a;
        reverse(b.begin(), b.end());
        if (cnt(a) == cnt(b))
        {
            for (int i = 0; i < a.size(); i++)
                cerr << a[i] + 1 << "  ";
            cerr << endl;
            ans++;
        }     
    }
    cout << ans << endl;
}
