#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
inline bool is_palindrome(const string& s) {
  return std::equal(s.begin(), s.end(), s.rbegin());
}
const long long MOD = 1000000007;
const long long INF = 1e9 + 5;
const double eps = 1e-7;
const double PI = acos(-1.0);
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  cout << (n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) / 120 *
              (n * (n - 1) * (n - 2) * (n - 3) * (n - 4));
  return 0;
}
