#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long int i, j, t, n, m, k, l, r, temp, result = 0LL, mini, maxi, flag;
  cin >> n;
  temp = (n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) / 120;
  cout << temp * temp * 120LL << endl;
  return 0;
}
