#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans;
  scanf("%I64d", &n);
  ans = n * (n - 1) * (n - 2) * (n - 3) * (n - 4);
  long long cnt = ans / 120;
  ans = ans * cnt;
  cout << ans << endl;
  return 0;
}
