#include <bits/stdc++.h>
using namespace std;
unsigned long long o, n;
int main() {
  cin >> n;
  o = n * n * (n - 1) * (n - 1) / 2 * (n - 2) * (n - 2) / 3 * (n - 3) *
      (n - 3) / 4 * (n - 4) * (n - 4) / 5;
  cout << o << endl;
  return 0;
}
