#include <bits/stdc++.h>
using namespace std;
void imprimirVector(vector<long long> v) {
  if (!v.empty()) {
    int p = v.size();
    cout << "[";
    for (int i = 0; i < (int)(p - 1); i++) cout << v[i] << ",";
    cout << v[p - 1] << "]" << endl;
  } else
    cout << "[]" << endl;
}
long long toNumber(string s) {
  long long Number;
  if (!(istringstream(s) >> Number)) Number = 0;
  return Number;
}
string toString(long long number) {
  ostringstream ostr;
  ostr << number;
  return ostr.str();
}
int main() {
  ios_base::sync_with_stdio(0);
  unsigned long long n;
  cin >> n;
  cout << (n * (n - 1) * (n - 2) * (n - 3) * (n - 4) / 120) * n * (n - 1) *
              (n - 2) * (n - 3) * (n - 4)
       << endl;
  return 0;
}
