#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m = 0, i, j = 1, l = 0, r = 0, x = 0, u = 0, y = 1, k = 0,
               ans = 0;
  cin >> n;
  for (i = (n); i >= (n - 4); i--) y *= i;
  cout << (y / 120) * y;
}
