#include <bits/stdc++.h>
using namespace std;
double eps = 1e-8;
int main() {
  int n;
  cin >> n;
  double ans = 1;
  for (int i = 0; i < 5; i++) ans = ans * (n - i) * (n - i);
  ans /= 120;
  cout << (long long)ans << endl;
  return 0;
}
