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