#include<bits/stdc++.h>
using namespace std;

int main()
{
   long long int n,ans; cin>>n;
   ans=(n*(n-1)*(n-2)*(n-3)*(n-4))/120;
   ans=ans*(n*(n-1)*(n-2)*(n-3)*(n-4));
  printf("%I64d",ans);
}

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<cmath>
#include<fstream>
#include<queue>
#include<ctime>
#include<stack>

#define ll unsigned long long int
#define lg long double
#define P_B push_back
#define IN insert
#define F first
#define S second

using namespace std;

//const ll maxn=1e6+10;
//const ll limit=1e6;
//const ll modl=1e9+7;
//bool aval[maxn];

ll n,s;
ll fac(ll k)
{
  if(k==0 || k==1)
    return 1;
  else
    return fac(k-1)*k;
}

/*ll tavan(ll paye,ll nama)
{
  ll hasel=1;
  for(int i=0;i<nama;i++)
    hasel*=paye;

  return hasel;
}
*/
/*void gharbal()
{
  for(int i=2;i<=limit;i++)
    {
      if(aval[i]==false)
	{
	  int d=i;
	  while(d+i<=limit)
	    {
	      d+=i;
	      aval[d]=true;
	    }
	}
    }
}
*/
int main()
{
  cin>>n;
  s=(ll)((n-4)*(n-3)*(n-2)*(n-1)*n)/fac(5);
  s*=n*(n-1)*(n-2)*(n-3)*(n-4);
  cout<<s;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);setprecision(30);

    long long ans=1,n,bans=0;
    cin>>n;
    long long j=2,bb=120;
    for(int i=0;i<5;i++)
    {
        long long k=n*n;
        ans*=k;
        while(ans%j==0 && j!=6)
        {
            ans/=j;
            bb/=j;
            j++;
        }
        n--;
    }
    cout<<ans/(long long)bb;
    return 0;
}

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;

long long n, ans;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	cin>>n;
long long p =n*(n-1)*(n-2)*(n-3)*(n-4);
	for(int i1 = n; i1 >= 1; i1--)
	{
		for(int i2 = i1 - 1; i2 >= 1; i2--)
		{
			for(int i3 = i2 - 1; i3 >= 1; i3--)
			{
				for(int i4 = i3 - 1; i4 >= 1; i4--)
				{
					for(int i5 = i4 - 1; i5 >= 1; i5--)
					{
						ans += p;
					}
				}
			}
		}
	}

	cout<<ans<<endl;
	return 0;
}

//
//  main.cpp
//  CoPr
//
//  Created by Ahmad Shallouf on 22/12/15.
//  Copyright © 2015 Ahmad Shallouf. All rights reserved.
//
#include<iostream>
#include<map>
#include<cmath>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include <limits>
#include <bitset>
#include<stack>
#include<bitset>
#include<math.h>
#include<set>
#include<string>
#include<cstring>
#include<queue>
#include<complex>
#include<math.h>
#include<memory.h>
#include<sstream>
#include<cstdio>
#include <iterator>
using namespace std;
#define All(a) a.begin(), a.end()
#define rep(i,n) for(int i=0;i<int(n);i++)
#define repd(i,n) for(int i=n-1;i>=0;i--)
#define repi(i,a,n) for(int i=int(a);i<int(n);i++)
#define clr(a, n) memset(a, n, sizeof(a));
#define mp make_pair
#define Odd(x) (x&1)
#define Even(x) (!Odd(x))
#define Pi M_PI
#define MOD 1000000007
#define F first
#define S second
#define INF 2000000000 // 2 billion
#define read freopen("in.in","r",stdin)
#define write freopen("out.out","w",stdout)
#define geti(a) scanf("%d",&a);
#define getll(a) scanf("%lld",&a);
#define ret return
#define retansl(ans) return ansl(ans),0;
#define ansl(ans) cout << ans << endl
#define anss(ans) cout << ans << " "
#define FIO ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<vector<int>> Adjlist;
typedef vector<vector<pair<int, int> > > wAdjlist;

/*
 vector<int> arr,tree;
 int N = 100;
 void build (int Node = 1,int L = 0,int R = N-1){
 if (L == R) tree[Node] = arr[L];
 else{
 build(Node<<1,L,(L+R)/2);
 build(Node<<1|1,(L+R)/2 + 1,R);
 tree[Node] = tree[Node<<1] + tree [Node<<1|1];
 }
 }
 int rsq(int p, int L, int R, int i, int j) {
 if (i > R || j < L) return 0;
 if (L >= i && R <= j) return tree[p];
 return  rsq(p<<1, L , (L+R)>>1, i, j)
 + rsq((p<<1)+1,( (L+R)>>1)+1, R , i, j);
 }
 */

int main(){
	ll n; cin>>n;
	ll ans = n*(n-1)*(n-2)*(n-3)*(n-4);
	ans*= n*(n-1)*(n-2)*(n-3)*(n-4)/5/4/3/2/1;
	ret cout<<ans<<endl,0;
}

#include<bits/stdc++.h>
#define ll long long int
#define lld long double
#define vll vector<ll>
#define pll pair<ll,ll>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define cases ll T=0;cin>>T;while(T--)
#define ain(a,n) for(i=0;i<(n);i++) cin>>(a)[i];
#define aout(a,n) for(i=0;i<(n);i++) cout<<(a)[i]<<" ";
#define all(v) (v).begin(),(v).end()
#define ED cout<<"\n";
#define pb push_back
#define mp make_pair
#define inf 9e18
#define MOD 998244353
#define ff first
#define ss second

using namespace std;

ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;
    if (x == 0)
        return 0;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    fast;

    //cases
    {
        ll n = 0, i = 0;
        cin >> n;
        ll ans = 1;
        for (i = n; i >= n - 4; i--)
            ans *= i;
        ans /= 120;
        for (i = n; i >= n - 4; i--)
            ans *= i;
        cout << ans;
        ED;
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll C(int n)//注意这里组合数会爆long long，一定要边乘边除!!
{
	ll t = 1;
	for(int i = 1; i <= 5; i++)
	{
		t = t*(n-i+1)/i;
	}
	//t = n*(n-1)*(n-2)*(n-3)*(n-4)/120;
	return t;
}
int main()
{
	int n;
	ll ans = 0;
	cin >> n;
	ans = C(n)*C(n)*120;
	printf("%I64d\n", ans);
	return 0;
}
//--------这里从n行中选5行，再从这5行里面每行的6列里面选取5列

//in dp prefix suffix sum helps..
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<stack>
#include <iterator>
#include <map>
#include<list>
#include <fstream>
#include<unordered_map>
#include<set>
#include<queue>
#define int  unsigned long long
#define double long double
#define pb   push_back
#define mp   make_pair
#define pii  pair<int,int>
#define pip pair<int, pair<int, int> >
#define viv vector<vector<int> >
#define vip vector< pair<int, int> >
#define vi vector<int>
#define mii  map<int, int>
#define li list<int>
#define qu deque<int>
#define vd vector<double>
#define set set<int>
#define stack stack<int>
#define fi first
#define se second
#define mem(x, y) memset(x, y, sizeof(x))
#define ps(x,y) fixed<<setprecision(y)<<x
using namespace std;
// author :: Anurag Anand.
using namespace std;
int z= 1000000007;
//int z= 998244353;
int gcd(int a, int b){
    if(a==0)return b;
    if(b==0)return a;
    return gcd(b, a%b);
}
int power(int a,int b)
{
	int res=1;
	while(b)
	{
		if(b&1)
		{
			res=(res*a)%z;
			b--;
		}
		else
		{
			a=(a*a)%z;
			b=b>>1;
		}
	}
	return res;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    cout.tie(NULL);
	int t;
	t=1;
	//cin>>t;
	while(t--){
		int n;
		cin>>n;
		int ans= n*(n-1)*(n-2)*(n-3)*(n-4);
		ans/=120;
		ans*=n*(n-1)*(n-2)*(n-3)*(n-4);
		cout<<ans<<"\n";
	}
}

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	unsigned long long n,p1,p2,p3;
	cin>>n;
	unsigned long long int b;
	p1=(n-4)*(n-3)*(n-2)*(n-1)*n;
	p2=(n-4)*(n-3)*(n-2)*(n-1)*n;
	cout<<p1/120*p2;
}

#include <iostream>
#include <math.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;
    /*while(n>0){
        ans*=n;
        n--;
    }*/
    cout<<ans;
	return 0;
}

#include <bits/stdc++.h>
#define int long long
#define inf 1e9
using namespace std;
const int N = 212345;
int read()
{
    int x;
    scanf("%I64d", &x);
    return x;
}
int getrand()
{
    srand(time(0));
    int x = rand();
    while(x --  > 0)
        rand();
    return rand() % 732 + 1;
}
int CNM(int n, int m)
{
    int res = 1, y = 1;
    for(int i = 1; i <= m; i ++)
        y *= i;
    for(int i = n; i > n - m; i --)
    {
        res *= i;
    }
    return res;
}
main()
{
    int n, m, i, j;
    cin >> n;
    cout << CNM(n, 5) / 120 * CNM(n, 5);
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll C(ll n, ll r){
    ll res = 1;
    for(ll i = 1; i <= r; i++) res*= (n-r+i), res/=i;
    return res;
}
void solve(){
    ll n; cin >> n;
    cout << C(n, 5)*n*(n-1)*(n-2)*(n-3)*(n-4) << "\n";

}

int main(){
    ios::sync_with_stdio(false); cin.tie(0);

    //ll t; cin >> t; while(t--)

    solve();
}

// https://codeforces.com/problemset/page/4?tags=math&order=BY_RATING_ASC

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

ll NCR(ll n, ll r)
{

    long long p = 1, k = 1;

    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;

            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;
    return p;
}

int main(){
ll n;
cin>>n;

ll res =  NCR(n,5);
ll nn = n;

ll d = 5;
while(d>0){
res*=n;
n--;
d--;
}

cout<<res;
return     0;
}

#include <bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	ll ans1 = 1, ans2 = 120;
	int n;
	cin >> n;
	for (ll i=n; i>=n-4; i--) {
		ans1 = ans1*i*i;
		ll g = __gcd(ans1, ans2);
		ans1 /= g;
		ans2 /= g;
	}
	cout << ans1;
	return 0;
}

#include <bits/stdc++.h>
#define PII pair < int , int >
#define PI 2.0*acos(0.0)
#define ll long long int
#define loop(i, a, n) for(int i = int (a); i <= int (n); i++)
#define vi vector < int >
#define pb push_back
#define ceil(a, b) (a %b == 0)?(a/b):(a/b)+1
int const up =   1e6 + 10 ;
int  const up1 = 5 * 1e4 + 10  ;
int const eps = 1e-9;
int const mod = 10000007;
using namespace std;

//global variables

 // global variables  end here

 // functions begin here

 // functions end
 int main()
 {
   ll n;
   cin >>  n;
   ll ans = 1;
   for(ll i = 0; i < 5; i++)
     ans *= ( n - i);

   cout <<( ans / 120) * ans << endl;
   return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define f(i,n) for(int i=0; i<n; ++i)

ll power(ll a, ll n, ll mod) {
	ll res = 1;
	while(n > 0) {
		if(n&1) {
			res = (res*a)%mod;
		}
		a = (a*a)%mod;
		n = n/2;
	}
	return res;
}

main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int t =1;
//	cin>>t;
	while(t--){
		ll n;
		cin>>n;
		ll res = n*(n-1)*(n-2)*(n-3)*(n-4)/120;
		cout<<res*n*(n-1)*(n-2)*(n-3)*(n-4);
 	}
}

#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;
unsigned long long int f(unsigned long long int n)
{
    unsigned long long int resultat=1;
    for(unsigned long long int i=0;i<5;i++)
        resultat*=(n-i);
    return resultat;
}

long long c(long long n , int k)
{
    long long resultat =1 ;
    for(int i=1 ; i<=k ; i++)
        resultat=(resultat*(n-i+1))/i ;
    return resultat ;
}

int main()
{
    //lire_input();
    unsigned long long int n,resultat;
    cin>>n;
    resultat=f(n)*c(n,5);
    cout<<resultat<<endl;
    return 0;
}

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

#include <bits/stdc++.h>

#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define rep(i,n,N) for(int i=n;i<=N;i++)
#define rap(i,n,N) for(int i=(int)n;i>=(int)N;i--)
#define mp make_pair
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define fi first
#define se second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define piii pair<int,pii>
#define piiii pair<pii,pii>
#define endl "\n"
const int MAX=1e5+5;
const ll MAX2 = 11;
const int MOD=1000000000 + 7;
const ll INF=20000;
const int dr[]={1,0,-1,0,1,1,-1,-1};
const int dc[]={0,1,0,-1,1,-1,1,-1};
const double pi = acos(-1);

ll n,x;

int main(){
	cout<<fixed<<setprecision(12);
    //freopen("input.txt", "r", stdin);
	//freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin>>n;
    x = n*(n-1)*(n-2)*(n-3)*(n-4)/120;
    cout<<120*x*x;
    return 0;
}

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#define f first
#define s second
#define ll long long
using namespace std;
string s[105];
int main()
{ios_base::sync_with_stdio(0); // ускорение ввода данных
//freopen("i.txt","r",stdin);
 long long a; cin>>a;
 cout << ((a*(a-1)*(a-2)*(a-3)*(a-4)/120*a*(a-1)*(a-2)*(a-3)*(a-4)))<< endl;
 return 0;return 0;
}

#include <bits/stdc++.h>
#include <unordered_set>
#define SLAY ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define PI 3.141592653589793238
#define ll long long
#define pii pair<int , int>
#define pll pair<long long , long long>
using namespace std;
int _=1 , tc=1;
int dx[] = { 0 , 0 , 1 , -1};
int dy[] = { 1 , -1 , 0 , 0};
const int MAXN = 1e7 + 1;
int spf[MAXN];
int d,x,y;
void sieve(){
	for(int i = 1 ; i<MAXN ; i++)spf[i]=i;
	for(int i = 4 ; i<MAXN ; i+=2)spf[i]=2;
	for(int i = 3; i*i<MAXN; i+=2){
		if(spf[i]==i){
			for(int j = i*i ; j<MAXN ; j+=i){
				if(spf[j]==j)spf[j]=i;
			}
		}
	}
}
void extended_gcd(int a , int b){
	if(b==0){
		d=a;
		x=1;
		y=0;
	}else{
		extended_gcd(b,a%b);
		int temp = y;
		y = x - y * (a/b);
		x = temp;
	}
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
int getmod(int x, int y , int mod ){return (((x - y)%mod)+mod)%mod;}
vector<string> split(string line, char dil){
    vector <string> tokens;
    stringstream check1(line);
    string intermediate;
    while(getline(check1, intermediate,dil)){
        tokens.push_back(intermediate);
    }
    return tokens;
}

void read(vector<ll>&v){
	for(int i =0;i<v.size();i++)cin>>v[i];
}

void solve(){
	ll n ;
	cin>>n;
	ll ans = 1 ;
	for(int i = 0 ; i<5;i++){
		ans *= n;
		n--;
	}
	ll temp = ans;
	ans = ans / 120 ;
	cout<<ans * temp <<endl;

}
int main(){
	SLAY
	while(_--){
		solve();
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;

ull used[1000][1000];

ull rec(ull n, ull k)
{
        if ( used[n][k] )
            return used[n][k];

        if(n==k)
            used[n][k] = 1;
        else if(k==1)
                used[n][k] = n;
        else
            used[n][k] = rec(n-1, k-1)+rec(n-1, k);

        return used[n][k];
}

int main() {
	ull a,res(1); cin >> a;
	res *= rec(a,5);
	res *= a; a--;
	res *= a; a--;
	res *= a; a--;
	res *= a; a--;
	res *= a;
	cout << res;
	return 0;
}
// n > k. n! / k! / (n-k)!

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

ll com(int n, int r)
{
  ll ret = 1;
  for (int i = n; i >= n-r+1; i--)
    ret *= i;
  for (int i = 1; i <= r; i++)
    ret /= i;
  return ret;
}

ll solve(int n)
{
  ll ret = com(n,5);
  for (int i = n; i >= n-5+1; i--)
    ret *= i;
  return ret;
}

int main()
{
  ll n; cin >> n;
  cout << solve(n) << endl;
}

#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n; cin>>n;

    ll ans=0;
    ans+=n*(n-1)/2*(n-2)/3*(n-3)/4*(n-4)/5;
    ans=ans*n*(n-1)*(n-2)*(n-3)*(n-4);

    cout<<ans;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long

ll C(int n,int m){
    ll res=1;
    for(int i=0;i<m;i++){
        res*=(n-i);
    }
    ll res2=1;
    for(int i=0;i<m;i++){
        res2*=(i+1);
    }
    return res/res2;
}

ll A(int n,int m){
    ll res=1;
    for(int i=0;i<m;i++){
        res*=(n-i);
    }
    return res;
}

int n;
int main(){

    int n;
    scanf("%d",&n);
    printf("%lld\n",C(n,5)*A(n,5));

}

#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;

int main()
{
unsigned long long n,x,t;
cin>>n;
x=(n)*(n-1)*(n-2)*(n-3)*(n-4);
t=x;
t=t/120;
cout<<x*t<<"\n";
    return 0;
}

#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<stack>
#include<set>
#include<queue>
#include<map>
using namespace std;
#define int long long
vector<int> used;
int c(int n, int k) {
	long double r = 1;
	for (int i = k + 1; i <= n; i++) {
		r *= i;
		r /= (i - k);
	}
	return r;
}
signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie();
	cout.tie();
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	int n;
	cin >> n;
	cout << c(n, 5)*c(n, 5)*5*4*3*2;
}

#include <bits/stdc++.h>
using namespace std;

long long A(long long n, long long m) {
	if(m > n) return 0;
	long long res = 1;
	for(int i = 1; i <= m; i++) {
		res *= n + 1 - i;
	}
	return res;
}
int main() {
#ifdef LOCAL_DEFINE
	//freopen("data.in", "rt", stdin);
	//freopen("data.out", "w", stdout);
	long long _begin_time = clock();
#endif

	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);
	int n;
	cin >> n;
	cout << A(n, 5) / 120 * A(n, 5) << '\n';

#ifdef LOCAL_DEFINE
	long long _end_time = clock();
	cerr << "time = " << _end_time - _begin_time << " ms\n";
#endif
	return 0;
}

#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define yo cout<<"i got here\n";
using namespace std;
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count()); /// rand_num = rng32()%range
const int mod = 1e9+7,siz = 1e2+5;
int t,n,m,k;
int32_t main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

    cin>>n;
    int ans = 1;
    for(int i = 1;i<=5;i++) ans*=(n-i+1);
    int here = ans;
    ans/=120;
    ans*=here;
    cout<<ans<<endl;
}

#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define ll long long int
#define X first
#define Y second
using namespace std;
int main()
{
    unsigned long long int t,k=0,i,j,c,m,n,h,w;
    cin>>n;
    w=1;
    for(i=0;i<=4;i++) {w=(w*(n-i))/(i+1);}
    cout<<(w*w*120LL);
    return 0;
}

#include <iostream>

using namespace std;

typedef long long li;
typedef unsigned long long uli;

int main() {
	uli a, n;
	cin >> n;

	a = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) / 120;
	a = a * n * (n - 1) * (n - 2) * (n - 3) * (n - 4);

	cout << a;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
int nC5(int n)
{
	int ans=n*(n-1)*(n-2)*(n-3)*(n-4)/120;
	return ans;
}

int32_t main()
{

	int n;
	cin>>n;
	int ans=120*nC5(n)*nC5(n);
	cout<<ans;
	return 0;
}

//Sachin Iyer, VIT Pune
//Jai Shree Ram
//Jai Gajanan
#include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define REP(n) for(int i=0;i<(n);i++)
#define FOR(a,b) for(int i=(a);i<=(b);i++)
#define FORD(a,b) for(int i=(a);i>=(b);i--)
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define endl "\n"
#define ALL(v) v.begin(), v.end()
#define ALLA(arr, sz) arr, arr + sz
#define SIZE(v) (int)v.size()
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<long long> vll;
typedef long long ll;
long long e = 1000000007;

int gcd(int a, int b){
    return b == 0 ? a : gcd(b, a % b);
}

void traverse(vector<int> v)
{
    for(int i = 0;i < v.size();++i)
        cout << v[i] << " ";
    cout << endl;
}

/////////////////////////////////////////////////////////////////////
long long ncr(int n, int r){
    if(n-r < r)
        r = n - r;
    long long N=1, R=1;
    while(r){
        N *= n;
        R *= r;

        ll x = gcd(N, R);
        N /= x;
        R /= x;

        n--, r--;
    }
    return N;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int i, j, k, l, n, x, y, m, t, z, a, b, test, temp;
    cin>>n;
    ll sum = 1;
    for(int i = n; i>n-5; i--)
        sum *= i;
    cout<<1LL*sum*ncr(n, 5);
    return 0;
}

#include <cstdio>
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <tuple>
#include <assert.h>
#include <deque>
#include <bitset>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long MAX = 510000;
const long long INF = 1LL << 60;
const long long MOD = 1000000007LL;

using namespace std;
typedef unsigned long long ull;
typedef  long long ll;

int main()
{
	ll N;
	scanf("%lld", &N);

	ll res = 0;
	res = N*(N-1)*(N-2)*(N-3)*(N-4)/120 * (N*(N - 1)*(N - 2)*(N - 3)*(N - 4));
	cout << res << endl;
	return 0;
}

// In The Name Of Allah
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e10;
typedef long long ll;
typedef long double ld;
typedef pair <ll, ll> pii;
const ll mod = 1e9 + 7;

void faster()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const ll M = 200 + 10;
const ll N = 10 * 100 + 10;

ll dp[M][M];

int main()
{
	faster();
	ll n;
	cin >> n;
	for (int i = 0; i <= n; i++)
	{
		for (int j = 0; j <= min(i, 5); j++)
		{
			if(j == 0 || j == i)
				dp[i][j] = 1;
			else
				dp[i][j] = dp[i - 1][j] + dp[i - 1][j - 1];
		}
	}
	cout << dp[n][5] * dp[n][5] * 120;
}

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define sz(s) ((int)(s.size()))
#define all(s) s.begin(),s.end()
#define rep(i,a,n) for(int i=a;i<=n;++i)
#define per(i,n,a) for(int i=n;i>=a;--i)

typedef long long ll;
typedef unsigned long long ull;

using namespace std;

const int MAXN = 3e5 + 256;
const char nxtl = '\n';
const double eps = (double)1e-9;
template<typename T> inline bool updmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool updmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

ll binpow(ll n) {
	ll res = 1;
	ll a = 2;
	while(n) {
		if(n & 1) res = (res * a);
		a *= a;
		n /= 2ll;
	}
	return res;
}
ll c[1777][10];

int main() {
	#ifdef accepted
		freopen(".in", "r", stdin);
		//freopen(".out", "w", stdout);
	#endif
	ll n; cin >> n;
	long double res = 1.000000;
	per(i, n, n - 4) {
		res *= i * 1ll * i;
	}
	res /= 120ll;
	cout << setprecision(0) << fixed << res;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define db double
#define mem(a,t) memset(a,t,sizeof(a))
typedef vector<int> VI;
typedef long long ll;
const db pi=acos(-1.0);
#define N 101

int main()
{
    //freopen("in.txt","r",stdin);
    int n;
    ll ans;
    while(~scanf("%d",&n)){
        ans=1ll*n*(n-1)*(n-2)*(n-3)*(n-4);
        ans/=120;
        ans*=ans;
        cout<<ans*120;
    }

    return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    long long n,ans=1,c=1;
    cin>>n;
    bool r=1;
    for(int i=n ; i>n-5 ; i--)
    {
        ans*=i;
        c*=i;
        if(c%120==0 && r)
        {
            c/=120;
            r=0;
        }
    }
    ans*=c;
    cout<<ans;
    return 0;
}

#include<iostream>
#include<stdio.h>
#include<cmath>
using namespace std;
unsigned long long n,k=1,a;
int main()
{
	cin>>n;
	a=n*n*(n-1)*(n-1)/2;
	a=a*(n-2)*(n-2)/3;
	a=a*(n-3)*(n-3)/4;
	a=a*(n-4)*(n-4)/5;
	cout<<a;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll MAXN = 4e5 + 5;
const long long MOD = 1e9 + 7;
const long double eps = 1e-6;

#define mp make_pair
#define pb push_back
#define all(temp) temp.begin(), temp.end()
#define REP(i,n) for(int i = 0; i < n; ++i)

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    ll n; cin >> n;
    ll ans = 1;
    for(int i = 0; i <= 4; ++i)
    {
        ans *= (n - i);
    }

    ans /= 120;

    for(int i = 0; i <= 4; ++i)
    {
        ans *= (n - i);
    }
    cout << ans;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define io ios_base::sync_with_stdio(false)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define PI 2*acos(0.0)

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int,int> pi;

const ll aN=2e5+5;
const ll mod=1e9+7;
const ll INF=2000000000;

int main()
{
    io;
    int tc=1;
    //cin>>tc;
    while(tc--)
    {
        unsigned long long n,i,out=1;
        cin>>n;
        for(i=0; i<5; i++)
        {
            out*=(n-i)*(n-i);
            out/=(i+1);
        }

        cout<<out<<endl;
    }
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
int a[10000];
using namespace std;
//pair<int, int> a[100];
int fact(int n)
{
	int m;
	m = 5;
	if (m == 1)
	return 1;
	return n * fact(n - 1);
	m--;
}
int main ()
{
 	long long m , n , i , g , k;
 	cin >> n;
 	m = n;
 	k = n;
 	g = n ;
 	for (i = 0; i < 4; i++)
 	{
 		g = g *  (n - 1);
 		n--;
 	}

 	cout << g / 120 * g;
	return 0;

}

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<math.h>
typedef unsigned long long ll;
using namespace std;
ll C(ll n,ll k)
{
    if(k>n)return 0;
    ll res=1;
    for(int i=1;i<=k;i++)
    {
        res*=n+1-i;
        res/=i;
    }
    return res;
}
int main()
{
	ll n;
	scanf("%I64d",&n);
	printf("%I64d",C(n,5)*n*(n-1)*(n-2)*(n-3)*(n-4));
    return 0;
}

#include<bits/stdc++.h>
#define pb push_back
#define ll long long
#define S second
#define F first
#define pii pair<int,int>
#define MP make_pair
using namespace std;
int main()
{
	ll n;
	cin>>n;
	n=n*(n-1)*(n-2)*(n-3)*(n-4);
	ll k=n/120;
	n*=k;
	cout<<n;
}

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ll;
int main()
{ll n;
cin>>n;
ll k=n*(n-1);
k*=n-2;
k*=n-3;
k*=n-4;
ll t = k/120;
t=t*k;
cout<<t;}

#include<bits/stdc++.h>
using namespace std ;

int main(){
	long long  n;
	cin>>n;

	long long  s= (n*(n-1)*(n-2)*(n-3)*(n-4)/120)*n*(n-1)*(n-2)*(n-3)*(n-4);
	cout <<s;
	return 0 ;
}

//                           ((_In the name of God_))
#include<bits/stdc++.h>
#define maxn 1000*1000
using namespace std;
int main(){
    unsigned long long n;
    cin>>n;
    printf("%I64d",((n*(n-1)*(n-2)*(n-3)*(n-4))*((n*(n-1)*(n-2)*(n-3)*(n-4))/(5*4*3*2))));
}

// Bismillahirrahmanir Rahim
//NAMOMIZARAHID
#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<cmath>

#define s1(a) scanf("%d",&a)
#define s1n(n) scanf("%d",&n)
#define sl1(a) scanf("%I64d",&a)
#define sl1n(n) scanf("%I64d",&n)
#define s2(a,b) scanf("%d%d",&a,&b)
#define sl2(a,b) scanf("%I64d%I64d",&a,&b)
#define s3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define sl3(a,b,c) scanf("%I64d%I64d%I64d",&a,&b,&c)
#define ss(s) scanf("%s",&s)
#define sc(ch) scanf("%c",&ch)

#define p1(a) printf("%d",a)
#define p1n(n) printf("%d",n)
#define pl1(a) printf("%I64d",a)
#define pl1n(n) printf("%d",n)
#define p2(a,b) printf("%d %d",a,b)
#define pl2(a,b) printf("%I64d %I64d",a,b)
#define p3(a,b,c) printf("%d %d %d",a,b,c)
#define pl3(a,b,c) printf("%I64d %I64d %I64d",a,b,c)
#define ps(s) printf("%s")
#define pc(ch) printf("%c")

#define nl printf("\n")

#define Rep(i,n) for(i=1;i<=n;i++)
#define rep(i,n) for(i=0;i<n;i++)
#define repab(i,a,b) for(i=a;i<=b;i++)

#define fil freopen("input.txt","rt",stdin)

#define pf printf
#define sf scanf

typedef long long l;
typedef unsigned long long ul;

using namespace std;

bool isprime(l n)
{
    for(l i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)return false;
    }
    return true;
}

bool prm[10000007];
l N= 10000000;

void sieve()
{
    prm[1]=1;
    for(l i=2;i<=sqrt(N);i++)
    {
        if(prm[i]==0)
        {
            for(l j=i+i;j<=N;j=j+i)prm[j]=1;
        }
    }
}

#define mod 1000000007
l bm(l b, l p)
{
    l namira;
    if(p==0)return 1;
    if(p%2==0)
    {
        namira=bm(b,p/2);
        return ((namira%mod)*(namira%mod))%mod;
    }
    else
    {
        return ((b%mod)*(bm(b,p-1)%mod))%mod;
    }
}
#define mx 200010
//SEGMENT TREE
/*
l arr[mx];
//l a[200010];
l tree1[mx*3];
void init(l node,l b,l e)
{
    if(b==e)
    {
        tree1[node]=1;
        return;
    }
    l Left=node*2;
    l Right=node*2+1;
    l mid=(b+e)/2;
    init(Left,b,mid);
    init(Right,mid+1,e);
    tree1[node]=tree1[Left]+tree1[Right];

}

l query(l node,l b,l e,l i)
{
    if(a[b]>i) return 0;
    if(a[e]<=i)
    {
        return tree1[node];
    }
    l Left=node*2;
    l Right=node*2+1;
    l mid=(b+e)/2;
    l p1=query(Left,b,mid,i);
    l p2=query(Right,mid+1,e,i);
    return p1+p2;

}
void update(l node,l b,l e,l i,l newvalue)
{
    if (i > e || i < b) return;
    if (b >= i && e <= i)
    {
        tree1[node]=newvalue;
        return;
    }
    l Left=node*2;
    l Right=node*2+1;
    l mid=(b+e)/2;
    update(Left,b,mid,i,newvalue);
    update(Right,mid+1,e,i,newvalue);
    tree1[node]=tree1[Left]+tree1[Right];
}

//SEGMENT TREE END*/
l NcR[200][200];

l ncr(l n,l r)
{
    if(r==0)return 1;
    if(r==1)return n;
    if(n==r)return 1;
    if(NcR[n][r]!=0)
    {
        return NcR[n][r];
    }
    else
    {
        NcR[n][r]=ncr(n-1,r)+ncr(n-1,r-1);
        return NcR[n][r];
    }
}

// Here starts main function :-)
int main()
{
    l n,r=1,x,x1;
    int i;
    //fil;
    sf("%I64d",&n);
    for(i=n;i>n-5;i--)
    {
        r=r*i;
    }
    pf("%I64d",r*ncr(n,5));
    nl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
ll dp[800][15];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;cin>>n;
    ll val=n*(n-1)*(n-2)*(n-3)*(n-4);
    ll t=val;
    t=t/120;
    cout<<t*val<<"\n";
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define dout if(debug) cout
#define pb push_back
#define all(a) a.begin(), a.end()
#define fast ios_base::sync_with_stdio(0); cin.tie(0)
typedef long long ll;
int mx = 1e5*5+5;
bool debug = 0;
double eps = 1e-15;
const double pi = 3.1415926535898;
ll P = 1e9+7;

ll mul_mod(ll a, ll b ,ll p){if(b<1)return 0;ll c=mul_mod(a,b/2,p);c+=c;if(b&1) c+=a;return c%p;}
ll mod_pow(ll a, ll b ,ll p){if(b<1)return 1;ll c=mod_pow(a,b/2,p);c=(mul_mod(c,c,p))%p;if(b&1)c=(mul_mod(a,c,p))%p;return c;}

vector <pair <ll,ll > > vv;
ll fctrz(ll n){ll m=n;for(ll i=2;i*i<=n;i++){if(n%i<1){m-=m/i;ll r=0;while(n%i<1){r ++;n/=i;}vv.pb({i,r});}}if(n>1){m-=m/n;vv.pb({n,1});}return m;}

pair <ll , ll> fib(ll n , ll p){if(n<1)return {0,1};pair<ll,ll>t,k;t=fib(n/2,p);k={((t.ff%p)*((2*t.ss-t.ff+p)%p))%p,(t.ff*t.ff+t.ss*t.ss)%p};if(n&1){k.ss=(k.ff + k.ss) % p;k.ff = (k.ss - k.ff+p)%p; }return k;}
int solve(){
	ll n;
	cin >> n;
	ll s = 1 , t;
	for(int i=n; i > n-5; i --) s *= i;
	t = s;
	s /= 120;
	s = s * t;
	cout << s ;

}

int main(){
	int t = 1;
	// full();
	// fast;
	//cin >> t;
	while(t--){
		solve();
	}
}

#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>

#define MAX 100005
#define MOD 1000000007
#define eps 1e-7

using namespace std;

typedef long long ll;
typedef complex <double> point;

#define pii pair<int, int>
#define pip pair<int ,pii>
#define F first
#define S second
#define bits(x) __builtin_popcount(x)
#define X real()
#define Y imag()

int ar[] = {0 ,0 ,1 ,-1};
int ac[] = {1 ,-1 ,0 ,0};
ll fast_pow(int n , int m){
    ll res = 1;
    ll p = n;
    while(m){
        if(m % 2)
            res *= p;
        p *= p;
        m /= 2;
    }
    return res;
}
int n;
ll c(int m ,int r){
    ll res = 1;
    for(int i = 0 ;i < r ;i++)
        res = (res * (m - i))/(i + 1);
    return res;
}
ll p(int m ,int r){
    ll res = 1;
    for(int i = 0 ;i < r ;i++)
        res = (res * (m - i));
    return res;
}
int main(){
#ifdef Code_Breakers
      freopen("input.txt", "r", stdin);
 //     freopen("input.txt" ,"w" ,stdout);
#endif //Code Breakers
    ios_base::sync_with_stdio(false);cin.tie(0);
    cout << fixed << setprecision(6);
    cin >> n;
    cout << c(n ,5) * p(n ,5);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef vector<int> BigInt;
const int base = 100000;

BigInt operator * (BigInt a, int b) {
	int carry = 0;
	int multi;
	BigInt rs;
	for (int i = 0; i < a.size(); i++) {
		multi = a[i] * b;
		rs.push_back((multi+carry)%base);
		carry = multi / base;
	}
	if (carry > 0) {
		rs.push_back(carry);
	}
	return rs;
}

BigInt operator / (BigInt a, int b) {
	int carry = 0;
	int dv;
	BigInt rs;
	int start = a.size() - 1;
	if (a[a.size() - 1] < b) {
		dv = a[a.size() - 1] * base + a[a.size() - 2];
		rs.insert(rs.begin(), dv / b);
		carry = dv % b;
		start = a.size() - 3;
	}
	for (int i = start; i >=0 ; i--) {
		dv = carry * base + a[i];
		rs.insert(rs.begin(), dv / b);
		carry = dv % b;
	}
	return rs;
}

void operator << (ostream &out, BigInt a) {
	printf("%d", a[a.size() - 1]);
	for (int i = a.size() - 2; i >= 0; i--) {
		printf("%05d", a[i]);
	}
}

int main()
{
	int n;
	cin >> n;
	BigInt ans;
	ans.push_back(1);
	for (int i = n; i >= n - 4; i--) {
		ans = ans*(i*i);
	}
	ans = ans / 120;
	cout << ans;
}

#include <iostream>
using namespace std;

int main() {
	long long n;
	cin >> n;
	cout << (long long) ((n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) / 120) * (n * (n - 1) * (n - 2) * (n - 3) * (n - 4));
	return 0;
}

#include <iostream>

#define ll long long
using namespace std;

ll f(ll i) {
	if(i == 1) return 1;
	return i*f(i-1);
}

ll p5(ll n) {
	return n*(n-1)*(n-2)*(n-3)*(n-4)/120;
}

int main() {
	ll n;
	cin >> n;
	ll ans = p5(n);
	ans = ans*ans*120;
	cout << ans;
	return 0;
}

#include "bits/stdc++.h"
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define cool ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	#define int  long long int
	#define pb push_back
	#define fe first
    #define lb lower_bound
    #define ub upper_bound
    #define pii pair<pair<int,int>,pair<int,int> >
	#define se second
	#define endl "\n"
	#define pi pair<int, int>
	#define mi          map<int,int>
    #define mii         map<pi,int>
	#define vi vector<int>
	#define vvi vector<vi>
    #define bs   binary_search
	#define rep(i,a,b) for(int i=a;i<b;i++)
	#define rep1(i,a,b) for(int i=a;i<=b;i++)
    #define all(c) (c).begin(),(c).end()
    #define sz(x)       (int)x.size()
	#define PI 3.14159265358979323846

	 const int N = 1e5+5;
     const int INF=1e18;
     int mod= 1e9+7;
     int dx[4]={0,0,+1,-1};
     int dy[4]={+1,-1,0,0};

    int po(int a, int b) {
    a %= mod;
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % mod;
        a = a * a % mod;
        b >>= 1;
    }
     return res;
   }

   void solve() {

		   int n;
		   cin>>n;

		   int ans =1;

		   int temp= n*(n-1)*(n-2)*(n-3)*(n-4);
		   ans = temp;
		   temp /= 120;
           temp*=ans;

		   cout<<temp<<endl;

	   }

  int32_t main() {
	  cool;
	  int t=1;
        //~ cin>>t;

	  while (t--)
		 solve();

	  return 0;
	}

#include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long ull;
typedef long double ld;
#define F first
#define S second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define len(s) s.length()
#define all(v) v.begin(),v.end()
const ll INF = LONG_MAX;
const int N = 2e5 + 5;
const ll mod = 1000000007 ;
using namespace std;

int main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	ios_base::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);

	ll tc = 1;
	// cin >> tc;

	while (tc--) {

		ll n, m, l, r;
		ll i, j;
		ll x, y, k, X;

		cin >> n;

		unsigned long long ans = 1;
		ll f[6] = {0};

		for (i = n; i > n - 5; i--) {
			ans = ans * i * i;

			if (i % 5 == 0 and  f[5] == 0) {
				ans = ans / 5;
				f[5] = 1;
			}

			if (i % 4 == 0 and f[4] == 0) {
				ans = ans / 4;
				f[4] = 1;
			}

			if (i % 3 == 0 and f[3] == 0) {
				ans = ans / 3;
				f[3] = 1;
			}

			if (i % 2 == 0 and f[2] == 0) {
				ans = ans / 2;
				f[2] = 1;
			}
		}

		cout << ans << endl;
	}
}

#include <bits/stdc++.h>

using namespace std;

#define vec vector
#define int unsigned long long
#define uset unordered_set
// int md = 1e9 + 7;

int ans = 1;
uset<int> st = {2, 3, 4, 5};

void update() {
  for (int i = 0; i < 4; ++i) {
    for (auto it: st) {
      if (ans % it == 0) {
        ans /= it;
        st.erase(it);
        break;
      }
    }
  }
}

signed main() {
  int n; cin >> n;
  ans *= (n * n);
  update();
  ans *= (n * n - (2 * n - 1));
  update();
  ans *= (n * n - (4 * n - 4));
  update();
  ans *= (n * n - (6 * n - 9));
  update();
  ans *= (n * n - (8 * n - 16));
  update();
  cout << ans;
}

/*
You gotta a dream , you gotta protect it.
*/

//***************************************************************************************
#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair

using namespace std;
const int mod=1e9+7;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin>>n;
    ll ans=n*(n-1)*(n-2)*(n-3)*(n-4)/(1*2*3*4*5)*n*(n-1)*(n-2)*(n-3)*(n-4);

    cout<<ans;
}

#include <iostream>
#include <math.h>
using namespace std;

#define ll long long int
#define MAX 500

inline int multiply(int x, int res[], int res_size);

inline void factorial(int n)
{
	int res[MAX];

	res[0] = 1;
	int res_size = 1;

	for (int x = 2; x <= n; x++)
		res_size = multiply(x, res, res_size);

	for (int i = res_size - 1; i >= 0; i--)
		cout << res[i];
	cout << endl;
}

inline int multiply(int x, int res[], int res_size)
{
	int carry = 0;

	for (int i = 0; i<res_size; i++)
	{
		int prod = res[i] * x + carry;
		res[i] = prod % 10;
		carry = prod / 10;
	}

	while (carry)
	{
		res[res_size] = carry % 10;
		carry = carry / 10;
		res_size++;
	}
	return res_size;
}

int main()
{
	ll n; cin >> n;
	ll r = n*(n - 1)*(n - 2)*(n - 3)*(n - 4) / 2 / 3 / 4 / 5;
	cout << r * r * 120 << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define  CIN            ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define  ll             long long int

int main()
{
    CIN;
    ll  a,ans=1;
    cin >> a;
    for(ll i = a ; i > a-5 ; i--) ans*=i;
    cout<<(ans/120ll)*ans<<endl;
    return 0 ;
}

#include<iostream>
#include<math.h>
using namespace std;

int main(){
#pragma warning(disable : 4996)
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
    long long int n;
    cin>>n;
    n=n*n*(n*n-2*n+1)/2*(n*n-4*n+4)/3*(n*n-6*n+9)/4*(n*n-8*n+16)/5;
    cout<<n;

return 0;
}

#include<iostream>
using namespace std;

int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	int long long n;
	cin >> n;
	cout << n * n * (n - 1) * (n - 1) /2 * (n - 2) * (n - 2) /3 *
		(n - 3) * (n - 3) /4 * (n - 4) * (n - 4) / 5;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
   unsigned long long res,n,i,j;
   cin>>n;
   res=n*(n-1)*(n-2)*(n-3)*(n-4);
   res=res/120*res;
   cout<<res;

return 0;
}

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <utility>
#include <ctime>
#include <map>

template<class A, class B, class C> struct triple { A first; B second; C third; triple(A, B, C); triple(); };
template<class A, class B, class C> triple<A, B, C>::triple(A a, B b, C c) { first = a; second = b; third = c; }
template<class A, class B, class C> triple<A, B, C>::triple() { }
template<class A, class B, class C> triple<A, B, C> make_triple(A a, B b, C c){ triple<A, B, C> t(a, b, c); return t; }
template<class A, class B, class C> bool operator<(triple<A, B, C> a, triple<A, B, C> b){ if (a.first != b.first) return a.first < b.first; if (a.second != b.second) return a.second < b.second; if (a.third != b.third) return a.third < b.third; }
template<class T> T inline sqr(T a) { return a * a; }

//#define  first
//#define  second
//#define  third
#define mp make_pair
#define mt make_triple

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

const ld PI = 3.141592653589793;
const ld E = 2.71828182845904523;
const ll LLINF = 9000000009000000099;
const ll INF = 2009000099;
const ll MOD = 1000000008;

using namespace std;

int main(){
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  ll res = 1;
  res *= n;
  res *= n - 1;
  res *= n - 2;
  res *= n - 3;
  res *= n - 4;
  cout << res / 120 * res;
}

#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
long long n, a, b, c;
int main() {
	cin>>n;
	a=n*(n-1)*(n-2)*(n-3)*(n-4);
	cout<<a/120*a;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cmath>
#include <string.h>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <utility>
#include <complex>
using namespace std;

long long c[150][150];

int main()
{
	c[0][0] = 1;
	for (int i = 1;i <= 100;i++)
	{
		for (int j = 0;j <= i;j++)
		{
			if (j == 0 || i == j)
				c[i][j] = 1;
			else
				c[i][j] = c[i - 1][j - 1] + c[i - 1][j];
		}
	}
	int n;
	cin >> n;
	long long ans = c[n][5];
	ans *= (n)*(n - 1);
	ans *= (n - 2)*(n - 3);
	ans*=(n - 4);

	cout << ans << endl;
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
	long long n;
	cin>>n;
	cout<<n*n*(n-1)*(n-1)/2*(n-2)*(n-2)/3*(n-3)*(n-3)/4*(n-4)*(n-4)/5;
	return 0;
}

//
//  main.cpp
//  Codeforces C
//
//  Created by 赵奕 on 16/2/19.
//  Copyright © 2016年 赵奕. All rights reserved.
//

#include <iostream>
#include <cmath>
long long ans,n,m,i,j,k,a,b,c;
using namespace  std;
int main(int argc, const char * argv[]) {
    cin >> n;
    cout << n*(n-1)*(n-2)*(n-3)*(n-4)/120*n*(n-1)*(n-2)*(n-3)*(n-4) << endl;

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iostream>
#include <functional>
#include <time.h>
#include <cmath>
#include <assert.h>
#include <deque>
#include <iomanip>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define piii pair<int, pair<int, int> >
#define plll pair<ll, pair<ll, ll> >

ll EPS = 1000000007;
const int INF = 1000000000;
double PI = 3.14159265358979323846;
const int MAXN = 100040;

ll abss(ll h) {
	return max(h, -h);
}

double fabss(double h) {
	return max(h, -h);
}

ll ceill(ll x, ll y) {
	if (x % y != 0) return (x / y) + 1;
	return x / y;
}

string itos(ll num) {
	string str = "";
	if (num == 0) return "0";
	while (num != 0) {
		str += ((num % 10) + '0');
		num /= 10;
	}
	reverse(str.begin(), str.end());
	return str;
}

ll sstoi(string num) {
	ll count = 1;
	for (int i = 0; i < (int)num.size() - 1; i++) {
		count *= 10;
	}
	ll ans = 0;
	for (int i = 0; i < (int)num.size(); i++) {
		ans += (num[i] - '0') * count;
		count /= 10;

	}
	return ans;
}

ll n, m, k;

int a[MAXN];
int b[MAXN];
int c[MAXN];

int main()
{
	cin >> n;
	ll t = n * (n - 1) * (n - 2) * (n - 3) * (n - 4);
	t = t * (t / 120);
	cout << t;
}

#include <bits/stdc++.h>
using namespace std;

int main()
{

  long long n;
  cin>>n;

  unsigned long long s=n*(n-1)*(n-2)*(n-3)*(n-4);
  s/=120;
  s=s*n*(n-1)*(n-2)*(n-3)*(n-4);
  cout<<s;

    return 0;
}

#include <iostream>
using namespace std;

int main(){
	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));
}

#include <iostream>
#include <string>
using namespace std;

void setupIO() {
	FILE *file1 = new FILE;
	FILE *file2 = new FILE;
	freopen_s(&file1, "input.txt", "r", stdin);
	freopen_s(&file2, "output.txt", "w", stdout);
}

long long int dp[780][780];

long long int nByM(int n, int m) {
	if (m == 0)
		return 1;
	if (m == n)
		return 1;
	if (dp[n][m] != 0)
		return dp[n][m];
	dp[n][m] = nByM(n - 1, m) + nByM(n - 1, m - 1);
	return dp[n][m];
}

int main() {
	//setupIO();

	int n;
	long long int u = 1;
	long long int d=5*4*3*2;

	cin >> n;
	for (size_t i = 0; i < 5; i++)
	{
		u = u*(n - i);
	}
	u = u / d;
	for (size_t i = 0; i < 5; i++)
	{
		u = u*(n - i);
	}
	cout << u;
	return 0;
}

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

using namespace std;

/*long long c(int n, int k) {
	if (k > n - k) return c(n, n - k);
	long long res = 1;
	//int res = 1;
	for (int i=n-k+1; i<=n; ++i)
		res *= i;
	for (int i=2; i<=k; ++i)
		res /= i;
	return res;
}*/

long long c (int n, int k) {
	long double res = 1;
	for (int i=1; i<=k; ++i)
		res = res * (n-k+i) / i;
	return (long long) (res + 0.01);
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	long long n;
	cin >> n;
	long long ans = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) * c(n, 5);
	cout << ans;

	return 0;
}

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;
typedef long long LL;
LL C(LL n,LL r){
    LL i,j,s=1;
    if(r>n)return 0;
    if(n-r<r)r=n-r;
    for(i=0,j=1;i<r;i++){
        s*=(n-i);
        while(j<=r&&s%j==0)
            s/=j,j++;
    }
    return s;
}
int main()
{
    LL n,ans=1;
    cin>>n;
    for(LL i=n,j=0;j<5;j++,i--){
        ans*=i;
    }
    cout<<ans*C(n,5)<<endl;
}

#include <bits/stdc++.h>
//#include "Header.h"

#define ll long long
#define fori(n) for(long long i=0;i<n;i++)
#define forj(n) for(long long j=0;j<n;j++)

using namespace std;

int isPrime(long long k){
    if(k<=1){
        return 0;
    }
    if(k==2){
        return 1;
    }
    if(k%2==0){
        return 0;
    }
    long long i = 3;

    while (i*i <= k) {
        if (k % i == 0) {
            return 0;
        }
        i += 2;
    }
return 1;
}

ll binomialCoeff(ll n, ll k)
{
    ll C[n + 1][k + 1];
    ll i, j;
    for (i = 0; i <= n; i++)
    {
        for (j = 0; j <= min(i, k); j++)
        {if (j == 0 || j == i)
                C[i][j] = 1;
            else
                C[i][j] = C[i - 1][j - 1] +
                          C[i - 1][j];
        }
    }
    return C[n][k];
 }

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

int main(int argc, const char * argv[]) {
 //cout<<"Om\n";
 //praise to lord
 //make cin/cout faster
 ios_base::sync_with_stdio(false);
 cin.tie(NULL);
 //code now

    ll n;
    cin>>n;
    ll t=binomialCoeff(n, 5);
    cout<<(t*t*120);
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define mem(a,b) memset(a,b,sizeof a) ;
#define vi vector<int>
#define ull unsigned long long
#define ll long long
#define db double
#define fl float
#define rep(i,a,b) for(int i=a;i<b;i++)
#define lrep(i,a,b) for(ll i=a;i<b;i++)
#define mod 1000000007
#define mpr make_pair
#define pb push_back
#define fr first
#define sn second
#define bpp(x) __builtin_popcountll(x)
const int INF = 1e9;
bool ok(string &s ,int l ,int r)
{
while(s[l]==s[r]) l++,r--;
return l>=r;
}
double power(int n,double x, unsigned int y)
{
    double temp;
    if( y == 0)
        return n;
    temp = power(n,x, y/2);
    if (y%2 == 0)
        return temp*temp;
    else
        return x*temp*temp;
}
ll cnk(ll n, int k)
{
    ll res = 1;
    for(int i = 0 ; (i) < (n) ; ++i) res = (res * (n - i)) / (i + 1);
    return res;
}
void solve()
{
	/*
	 int n;
    cin >> n;
    int a[5] = {};
    for (int i = 0 ; i < 5 ; ++ i)
        a[i] = n % 10 , n /= 10;
    int m = a[4] * 10000 + a[2] * 1000 + a[0] * 100 + a[1] * 10 + a[3];
    int res = 1;
    for (int i = 0 ; i < 5 ; ++ i)
        res = (ll)res * m % 100000;
    printf("%05d\n" , res);
	*/
ll n, t;

    cin >> n;
    ll res = n * (n - 1) * (n - 2) * (n - 3) * (n - 4);
    res = res * (res / 120);
    cout << res;
//ans=n- (n/2) -(n/3) - (n/5) - (n/7) + (n/6) + (n/14) + (n/10) + (n/15) + (n/21) + (n/35) -(n/30) -(n/42) - (n/70) + (n/210);
//double x=1.000000011;
//double ans=n*pow(x,t);
//printf("%.9lf",ans);
//fill(a, ,-1e9);
return;
}
int main()
{
ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t=1;
	//cin >> t;
	while(t--){
		solve();
	}
	return 0;
}

/**
Programmer : Iman Mousaei

Wrong/Time Limit/Bug/Incomplete

**/

#include <bits/stdc++.h>
#define iOS ios_base::sync_with_stdio(false);
#define pb push_back
#define ALL(x) (x).begin(), (x).end()
#define CP(x) cout << "CP " << x << endl;
#define CLR(x, a) memset(x, a, sizeof x)
#define S second
#define F first

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int,int> pii;

const ll LLINF = 1e17 + 7;
const ll INF = 1e9 + 7;
const ll EPS = 1e-9 - 7;

const ll MAX = 1e9 + 7;
const ll MOD = 1e9 + 7;

ll C(int n, int k)
{
    ll res = 1;
    if (k > n - k)
    k = n - k;
    for (int i = 0; i < k; ++i)
    {
        res *= (n - i);
        res /= (i + 1);
    }

    return res;
}

int main()
{
    ll n;
    cin >> n;

    ll m = n * (n-1) * (n-2) * (n-3) * (n-4) / 120;

    ll ans = m * m * 120;

    cout << ans;

	return 0;
}

#include<iostream>
using namespace std;
long long n;
int main()
{
    cin>>n;
    cout<<n*(n-1)*(n-2)*(n-3)*(n-4)/120*n*(n-1)*(n-2)*(n-3)*(n-4);
}

#include <bits/stdc++.h>

#define sd(x)       scanf("%d", &x)
#define slld(x)     scanf("%I64d", &x)
#define sc(x)       scanf("%c", &x)
#define pd(x)       printf("%d", x)
#define plld(x)     printf("%I64d\n", x)
#define pc(x)       printf("%c", x)
#define pdln(x)     printf("%d\n", x)
#define prl(x)      cout << x << endl
#define LL          long long
#define forn(i, n)  for(int i = 0; i < (int)n; i++)
#define fori(i, n)  for(int i = 1; i <= (int)n; i++)
#define revn(i, n)  for(int i = (int)(n - 1); i >= 0; i--)
#define pb          push_back
#define pii         pair <int, int>

#define mem(x, y)   memset(x, y, sizeof(x))
#define MAX         100002
#define MOD         1000000007

using namespace std;

int main()
{
    //freopen("in.txt", "r", stdin);
    LL n, ans;
    slld(n);
    ans = n * (n - 1) * (n - 2) * (n - 3) * (n - 4);
    LL cnt = ans / 120;
    ans = ans * cnt;
    prl(ans);
    return 0;
}

#include <iostream>
using namespace std;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif // _DEBUG
    int n;
    cin>>n;
    long long int k=(long long int)n*n*(n-1)/2*(n-1)*(n-2)/3*(n-2)*(n-3)/4*(n-3)*(n-4)/5*(n-4);
    cout<<k;
}

#include <bits/stdc++.h>
#define pi acos(-1)
#define sz(x) (int) x.size()
#define pii pair<int, int>
#define mii map<int, int>
#define vi vector<int>
#define vb vector<bool>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define popb pop_back
#define all(v) v.begin(),v.end()
#define mset(v, x) memset(v, x, sizeof(v))
#define mset2d(v, x, n) memset(v, x, sizeof(v[0][0]) * n * n)
#define mset2dd(v, x, n, m) memset(v, x, sizeof(v[0][0]) * n * m)
#define debug(x) cout<<#x<<" : "<<x<<endl
#define debug2(x,y) cout<<#x<<" : "<<x<<" & "<<#y<<" : "<<y<<endl
#define test() cout<<"hola papa"<<endl
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
using namespace std;

ll n, ans = 1;

int main() {
    ios::sync_with_stdio(false);
    cin >> n;
    for (ll x = n; x > n - 5; --x) {
        ans *= (x * x);
        ans /= (n - x + 1);
    }
    cout << ans << "\n";
}

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

typedef long double lb;

#define COUT(n, k) cout << fixed << setprecision(k) << n

ll fact(ll k)
{
    ll res = 1;

    for(ll i=1;i<=k;i++)
        res *= i;

    return res;
}

double C(ll n, ll k)
{

    ll t = 1;

    vector<double> A, B;

    for(int i=1;i<=k;i++)
        A.push_back(i);

    while((n - k + t) <= n)
    {
        B.push_back(n - k + t);
        t++;
    }

    double res = 1;

    for(int i=0;i<A.size();i++)
    {
        res *= B[i] / A[i];
    }

    return res;
}

int main()
{
    ll n;

    cin >> n;

    ll res = C(n, 5) * (n * (n - 1) * (n - 2) * (n - 3) * (n - 4));

    cout << res;
}

#include<bits/stdc++.h>
using namespace std;

long long n, ans = 1;

int main() {
	cin >> n;
	for (int i = n; i > n - 5; i--)
		ans = ans * i * i / (n - i + 1);
	cout << ans;
}

#include <bits/stdc++.h>
using namespace std;

int main(int argc, const char **argv) {
    if (argc == 2) {
        freopen(argv[1], "r", stdin);
    }

    long long n;
    cin>>n;
    long double ans=1;
    ans*=n*n;
    n--;ans*=n*n;
    n--;ans*=n*n;
    n--;ans*=n*n;
    n--;ans*=n*n;

    cout<<fixed<<setprecision(0)<<ans/120<<endl;
}

#include <iostream>
using namespace std;
unsigned long long n;
int main()
{
    cin>>n;
    cout<<n*(n-1)/2*(n-2)/3*(n-3)/4*(n-4)/5*n*(n-1)*(n-2)*(n-3)*(n-4);
    return 0;
}

//#define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
#include <iomanip>

using namespace std;

typedef long long LL;
typedef pair<int, int> pair_ii;
typedef pair<long long, long long> pair_LL;

#define fori(i, s, n) for (int i = s; i < n; ++i)
#define pb push_back
#define mp make_pair

LL const modul = 1;

LL mod_sum(LL x, LL y) {
	return (x + y) % modul;
}

LL mod_sub(LL x, LL y) {
	if (x > y) {
		return (x - y) % modul;
	}
	else {
		return (x + modul - y) % modul;
	}
}

LL mod_mpl(LL x, LL y) {
	return (x * y) % modul;
}

LL bin_pow(LL x, LL e) {
	if (e == 0) {
		return 1;
	}
	if (e == 1) {
		return x;
	}
	LL y = bin_pow(x, e / 2);
	y = y * y;
	if (e % 2 == 0) {
		return y;
	}
	else {
		return y * x;
	}
}

LL mod_rev(LL x) {
	return bin_pow(x, modul - 2);
}

LL mod_div(LL x, LL y) {
	return mod_mpl(x, mod_rev(y));
}

LL c_n(LL n, LL k) {
	LL ans = 1;
	fori(i, 1, k + 1) {
		ans *= n - i + 1;
		ans /= i;
	}
	return ans;
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	LL n;
	cin >> n;
	LL fact_5 = 5 * 4 * 3 * 2;
	LL ans = c_n(n, 5) * c_n(n, 5) * fact_5;
	cout << ans;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main ()
{
       long long int k, n;
       cin >> k;
       n = pow (k, 2);
       n *= pow ((k - 1), 2);
       n /= 2;
       n *= pow ((k - 2), 2);
       n /= 3;
       n *= pow ((k - 3), 2);
       n /= 4;
       n *= pow ((k - 4), 2);
       n /= 5;
       cout << n;
       return 0;
}

#include <stdio.h>
#include <iostream>

#include <map>
#include <vector>
#include <queue>
#include <set>

#include <string>
#include <string.h>
#include <algorithm>
#include <math.h>

using namespace std;

#define lli long long int
#define mp make_pair
const lli N = 600;
const double INF = 100000000;

double power(double x, lli n) {
	double r = 1.0;
	while (n > 0) {
		if (n % 2 != 0)
			r *= x;
		x *= x;
		n /= 2;
	}
	return r;
}

lli n;

lli a[1000][1000];

int main() {
	ios_base::sync_with_stdio(0);

	cin >> n;
	for (int i = 1; i < 1000; i++) {
		a[i][1] = i;
	}
	for (int i = 2; i < 1000; i++) {
		for (int j = 2; j < 1000; j++) {
			a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
		}
	}

	cout << a[n][5] * a[n][5] * 120L;
}

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <stdlib.h>

using namespace std;
// vector push_back push front top empty pop make_pair long long insert begin end
typedef long long ll;
typedef vector<int> vi;
typedef vector<pair <int,int> > vpi;
typedef vector<long long> vll;
typedef pair<int,int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define B begin()
#define rB rbegin()
#define E end()
#define rE rend()
#define Z size()
#define REP(i,a,b) for (int i = a; i < b; i++)
#define L length()
#define show(a) cerr << " *** " << a << endl;
#define show1(a) cerr << " /// " << a << endl;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
    ll n;
    cin >> n;
    ll out = n*(n-1)*(n-2)*(n-3)*(n-4);
    out /= 120;
    out *=n*(n-1)*(n-2)*(n-3)*(n-4);
    cout << out;
}

#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <iterator>
#include <set>
#include <map>
#include <string>
#include <cmath>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
ull n, i, j, a, b, c,f,s,t,h,max_pref,ans;
int main()
{
	cin >> n;
	a = n;
	ans = n;
	n--;
	while (n > a-5)
	{
		ans *= n;
		n--;
	}
	cout << ans / 120 * ans;

}

#include <bits/stdc++.h>
using namespace std;

long long n;

int main(){
    ios_base::sync_with_stdio(0);
    //ifstream in ("input.txt");

    cin >> n;

    cout << (n*(n-1)*(n-2)*(n-3)*(n-4)/5/4/3/2)*(n*(n-1)*(n-2)*(n-3)*(n-4)/5/4/3/2)*5*4*3*2;

}

#include <bits/stdc++.h>

#define pb push_back
#define pf push_front
#define mp make_pair
#define sz size
#define ll long long
#define ld long double
#define fs first
#define sc second
#define forn(i, f, t) for(int i = f; i < t; i++)
#define all(x) (x).begin(), (x).end()
#define ins insert

const int INF = 2147483647;
const int MOD = 1000000007;
const ll INF64 = 9223372036854775807;
const ld EPS = 1e-7;

using namespace std;

int main(){
    unsigned ll n;
    cin >> n;
    cout <<  n * (n - 1) * (n - 2) * (n - 3) * (n - 4) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4) / 120 << "\n";
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
typedef long long ll ;
ll fact[101];
int main()
{
    ll n ;
    cin >> n ;
    ll ans = 1LL;
    for(ll i= n-4 ; i<= n ;i++){
        ans*=i;
    }
    cout << ans ;
    return 0;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll n;
ll C(ll a,ll b){
	ll ans=1;
	for(ll i=b+1;i<=a;i++)ans*=i;
	for(ll i=2;i<=a-b;i++)ans/=i;
	return ans;
}
int main(){
	cin>>n;
	cout<<n*(n-1)*(n-2)*(n-3)*(n-4)*C(n,5);
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define f(i,n) for(int i=0; i<n; ++i)

ll power(ll a, ll n, ll mod) {
	ll res = 1;
	while(n > 0) {
		if(n&1) {
			res = (res*a)%mod;
		}
		a = (a*a)%mod;
		n = n/2;
	}
	return res;
}

main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int t =1;
//	cin>>t;
	while(t--){
		ll n;
		cin>>n;
		ll res = (n-1)*(n-1)*(n-2)*(n-2)*(n-3)*(n-3)*(n-4)*(n-4)/120;
		cout<<res;
 	}
}

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <clocale>
#include <fstream>
#include <sstream>
#include <iterator>
using namespace std;

long long gcd(long long a, long long b) {
	return b ? gcd(b, a % b) : a;
}

int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}

const int mod = 1e9 + 7;

long long binpow(long long a, long long b) {
	long long res = 1;
	while (b > 0)
		if (b & 1) {
			res = (long long)(res * 1ll * a);//% mod;
			--b;
		}
		else {
			a = (long long)(a * 1ll * a);//% mod;
			b >>= 1;
		}
	return (long long)res;
}

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	long long n;
	cin >> n;
	long long ans = (n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4))/120;
	cout << ans;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int i, j;
    long long int n, a;
    cin>>n;
    a = n*(n-1)*(n-2)*(n-3)*(n-4);
    if(n==5) cout<<a<<endl;
    else cout<<a*n<<endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	ll ans = 1;
	int n;
	cin >> n;
	for (int i=n; i>=n-4; i--) {
		ll res = i*i;
		ans *= res;
	}
	ans /= 120;
	cout << ans;
	return 0;
}

#include <iostream>
using namespace std;

int main() {
	long long n,p=1;
	cin>>n;
	for(int i=n;i>0;i--){
	    p*=i;
	}
	cout<<p;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;
typedef unsigned long long ull;
int main(){
	std::ios::sync_with_stdio(false);
   ull n;
   cin>>n;
   ull ans = 5*(n-1)*(n-2)*(n-3)*(n-4);
   cout<<ans<<endl;
	return 0;
}

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
    double n, i = 0, ans = 1;
    cin >> n;
    for (; i < 5; ++i)
        ans *= (n-i);
    ans /= 120;
    for (i = 0; i < 5; ++i)
        ans *= (n-i);
    cout << setprecision(0) << fixed << ans;
}

#include<iostream>
#define ll long long

using namespace std;
ll int fact(int);

int main(){
	int n;
	cin>>n;

	int prod=1;
	if(n>=5){
		for(int i=n;i>n-5;i--){
			prod=prod*i;
		}

		prod*=(fact(n))/(fact(5)*fact(n-5));
	}

	else if(n<5){
		int x=(5-n);
		if(x>=n){
			prod*=(fact(n))/(fact(x)*fact(n-x));
		}

		else{
			prod=1;
		}
	}

	cout<<prod;
	return 0;
}

ll int fact(int a){
	if(a==1 || a==0){
		return 1;
	}

	else{
		return a*fact(a-1);
	}
}

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
#include<algorithm>
#include<math.h>
using namespace std;
typedef long long ll;

int main()
{
    ll n;
    cin>>n;
    cout<<(n*(n-1)*(n-2)*(n-3)*(n-4)*(n-4))<<endl;
    return 0;
}

//
//  main.cpp
//  Codeforces Practice
//
//  Created by Aakash Kumar on 17/08/20.
//  Copyright © 2020 Aakash Kumar. All rights reserved.
//

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <climits>
#include <queue>
using namespace std;

class B_808 {
public:
    int main() {
        int n, k, a[200005];
        double ans = 0.0, sum = 0.0;
        cin >> n >> k;
        for (int i = 0 ; i < n ; i++) cin >> a[i];

        for (int i  = 0 ; i < k ; i++) sum += a[i];
        ans += sum/((double) n-k+1);

        for (int i = k ; i < n ; i++) {
            sum += a[i] - a[i-k];
            ans += sum/((double) n-k+1);
        }
//        int left, right, freq;
//        for(int i = 0 ; i < n ; i++) {
//            left = (i-k+1) >= 0 ? i-k+1 : 0;
//            right = i > (n-k)   ? n-k   : i;
//            freq = right-left+1;
//            ans += (((double) freq) * ((double) a[i])) / ((double) n-k+1);
//        }
        cout << std::fixed;
        cout << std::setprecision(6) << ans << endl;

        return 0;
    }
};

class C_43 {
public:
    int main() {
        int n, a, ans = 0, m[3] = {0};
        cin >> n;
        for (int i = 0 ; i < n ; i++) {
            cin >> a;
            m[a%3]++;
        }

        ans += m[0]/2;
        ans += min(m[1], m[2]);

        cout << ans << endl;

        return 0;
    }
};

class B_814 {
private:
    int n, a[1004], b[1004];
    bool isValid() {
        int d = 0;
        for (int i = 0 ; i < n ; i++) {
            if (a[i] != b[i]) d++;
        }
        return d == 1;
    }
public:
    int main() {
        int missing, rep  = 0;
        set <int> s;
        cin >> n;
        for (int i = 0 ; i < n ; i++) cin >> a[i];
        for (int i = 0 ; i < n ; i++) cin >> b[i];

        for (int i = 1 ; i <= n ; i++) s.insert(i);

        for (int i = 0 ; i < n ; i++) {
            if (s.find(a[i]) != s.end()) {
                s.erase(a[i]);
            } else {
                rep = a[i];
            }
        }
        missing = *s.begin();

        for (int i = 0 ; i < n ; i++) {
            if (a[i] == rep) {
                a[i] = missing;
                if (isValid()) {
                    break;
                } else {
                    a[i] = rep;
                }
            }
        }

        for (int i = 0 ; i < n ; i++) cout << a[i] << (i==n-1 ? "\n" : " ");

        return 0;
    }
};

class C_628 {
public:
    int main() {
        int n, k;
        string s;
        cin >> n >> k;
        cin >> s;
        string output = s;

        for (int i  = 0 ; i < n && k > 0 ; i++) {
            if (abs('a' - s[i]) >= abs('z' - s[i])) {
                if (abs('a' - s[i]) < k) {
                    output[i] = 'a';
                    k -= abs('a' - s[i]);
                } else {
                    output[i] = s[i]-k;
                    k = 0;
                }
            } else {
                if (abs('z' - s[i]) < k) {
                    output[i] = 'z';
                    k -= abs('z'- s[i]);
                } else {
                    output[i] = s[i]+k;
                    k = 0;
                }
            }

        }

        if (k == 0) {
            cout << output;
        } else {
            cout << "-1";
        }

        return 0;
    }
};

class D_182 {
private:
    bool verify(string &d, string &s) {
        int n = (int) d.length();

        for (int i = 0 ; i < s.length() ; i++) {
            if (d[i%n] != s[i]) {
                return false;
            }
        }

        return true;
    }
public:
    int main() {
        string s1, s2, d;
        cin >> s1 >> s2;
        set <string> divisors;
        int ans = 0;

        int n = (int) s1.size();
        for (int i = 1 ; i*i <= n ; i++) {
            if (n%i == 0) {
                d = s1.substr(0, i);
                if (verify(d, s1)) {
                    divisors.insert(d);
                }

                d = s1.substr(0, n/i);
                if (verify(d, s1)) {
                    divisors.insert(d);
                }
            }
        }

        n = (int) s2.size();
        for (int i = 1 ; i*i <= n ; i++) {
            if (n%i == 0) {
                d = s2.substr(0, i);
                if (verify(d, s2) && divisors.find(d) != divisors.end()) {
                    ans++;
                }

                if (i*i == n) continue;

                d = s2.substr(0, n/i);
                if (verify(d, s2) && divisors.find(d) != divisors.end()) {
                    ans++;
                }
            }
        }

        cout << ans;

        return 0;
    }
};

class B_198 {
public:
    int main() {
        int n, k;
        string s1, s2;
        map <int, vector <int>> adj;
        cin >> n >> k;
        cin >> s1 >> s2;

        for (int i = 0 ; i < n ; i++) {
            if (s1[i] == '-') {
                if (i>0 && s1[i-1] == '-') {
                    adj[i].push_back(i-1);
                }
                if (i<n-1 && s1[i+1] == '-') {
                    adj[i].push_back(i+1);
                }
                if (i+k<n && s2[i+k] == '-') {
                    adj[i].push_back(n+i+k);
                }
            }
        }

        for (int i = 0 ; i < n ; i++) {
            if (s2[i] == '-') {
                if (i>0 && s2[i-1] == '-') {
                    adj[n+i].push_back(n+i-1);
                }
                if (i<n-1 && s2[i+1] == '-') {
                    adj[n+i].push_back(n+i+1);
                }
                if (i+k<n && s1[i+k] == '-') {
                    adj[n+i].push_back(i+k);
                }
            }
        }

        vector <int> d(n+n, INT_MAX);
        priority_queue<pair<int, int>, vector<pair<int, int>>, greater<>> q;
        bool flag = false;

        d[0] = 0;
        q.push({0, 0});

        while(!q.empty()) {
            int idx = q.top().second;
            int dist = q.top().first;
            q.pop();

            if (idx%n + k >= n && dist <= idx) {
                flag = true;
                break;
            }

            d[idx] = dist;
            for (int i = 0 ; i < adj[idx].size() ; i++) {
                if (dist+1 < d[adj[idx][i]] && dist+1 <= adj[idx][i]%n) {
                    d[adj[idx][i]] = dist+1;
                    q.push({dist+1, adj[idx][i]});
                }
            }
        }

        cout << (flag ? "YES\n" : "NO\n");

        return 0;
    }
};

class H_630 {
public:
    int main() {
        int n;
        cin >> n;
        cout << n*(n-1)*(n-2)*(n-3)*(n-4);
        return 0;
    }
};

int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    H_630().main();
    return 0;
}

/*
class A {
public:
    int main() {
        return 0;
    }
};
*/

#include <iostream>
using namespace std;

unsigned long long int comb( unsigned long long int n, unsigned long long int m)
{
	unsigned long long ans=1;
	if(n==5) return(1);
	for(unsigned long long int i = 1; i <= m; i++)
		{
			ans *= n-i+1;
			ans /=i;
		}
	return(ans);
}

unsigned long long int comb2( unsigned long long int n, unsigned long long int m)
{
	unsigned long long ans=1;
	//if(m==1) return(ans);
	for(unsigned long long int i =1; i <= m; i++)
		{
			ans *= (n-i+1);
		}
	return(ans);
}
int main()
{
	unsigned long long n, a1,a2;
	unsigned long long ans;
	cin >> n;
	a1 = comb(n,(n-5+1));
	a2 = comb2(n,5);
	ans = a1*a2;
	//cout << a1 << " " << a2 << endl;
	cout << ans;
	return 0;
}

#include<stdio.h>
//#include<bits/stdc++.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<sstream>
#include<set>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#include<limits.h>
#define inf 0x7fffffff
#define INF 0x7fffffffffffffff
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define ULL unsigned long long
#define MAX 1000
using namespace std;
LL n;
ULL C(int n,int m)
{
    if(n<m) return 0;
    ULL ans=1;
    for(int i=0; i<m; i++) ans=ans*(ULL)(n-i)/(ULL)(i+1);
    return ans;
}
ULL A(int n,int m)
{
    if(n<m) return 0;
    ULL ans=1;
    for(int i=0; i<m; i++) ans*=(ULL)(n-i);
    return ans;
}
int main()
{
    int n;
    cin>>n;
    cout<<C(n,5)*120;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#pragma GCC optimize("Ofast")
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define endl "\n"
#define int long long
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const int mod = 1000000007;

int power(int x,int y){int res=1;x=x%mod;while(y>0){if(y&1)res=(res*x)%mod;y=y>>1;x=(x*x)%mod;}return res;}
int gcd(int a,int b){if (a==0)return b;return gcd(b%a,a);}
int max(int a,int b){int ans=a>b?a:b;return ans;}
int min(int a,int b){int ans=a<b?a:b;return ans;}

signed main()
{
	//fast;
    int n,c1,c2,c;
    cin>>n;
    c1=(n*(n-1)*(n-2)*(n-3)*(n-4))/120;
  	c2=120;
	c=c1*c2;
	cout<<c;
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <clocale>
#include <fstream>
#include <sstream>
#include <iterator>
using namespace std;

long long gcd(long long a, long long b) {
	return b ? gcd(b, a % b) : a;
}

int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}

const int mod = 1e9 + 7;

long long binpow(long long a, long long b) {
	long long res = 1;
	while (b > 0)
		if (b & 1) {
			res = (long long)(res * 1ll * a);//% mod;
			--b;
		}
		else {
			a = (long long)(a * 1ll * a);//% mod;
			b >>= 1;
		}
	return (long long)res;
}

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	long long n;
	cin >> n;
	long long ans = sqrt((n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4)));
	cout << ans;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

long long n;

signed main(){
  cin>>n;
  n*=(n-1)*(n-2)*(n-3)*(n-4);
  return cout<<n*n/120<<endl,0;
}

#include<bits/stdc++.h>
using namespace std;
long long ans=1;
int n;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		ans*=i;
	}
	cout<<ans;
}

#include <iostream>
using namespace std;

int fac(int n) {
	int c = 1;
	for (int i = 1; i <= n; i++) {
		c *= i;
	}
	return c;
}

int main() {
	int n, res;
	cin >> n;
	res = n*(n-1)*(n-2)*(n-3)*(n-4)/(fac(n))*n*(n-1)*(n-2)*(n-3)*(n-4);
	cout << res;
	return 0;
}

#include<stdio.h>
int main()
{
    int a[200]; //array will have the capacity to store 200 digits.
    int n,i,j,temp,m,x;
        scanf("%d",&n);
        a[0]=1;
        m=1;
        temp = 0;
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            x = a[j]*i+temp;
            a[j]=x%10;
            temp = x/10;
        }
        while(temp>0)
        {
            a[m]=temp%10;
            temp = temp/10;
            m++;
        }
    }
    for(i=m-1;i>=0;i--)
        printf("%d",a[i]);
    printf("\n");
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	ll int n;
	cin>>n;
	ll int i,ans=1;
	for(i=0;i<n;i++)
	{
		ans=ans*(n-i);
	}
	cout<<ans<<endl;
	return 0;
}

#include<iostream>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<unordered_set>
#include<algorithm>

using namespace std;

#define endl                   '\n'
#define gap                    ' '
#define MAX                    LLONG_MAX
#define MIN                    LLONG_MIN
#define MOD                    2000000007
#define remax(a, b)            a = max(a, b)
#define remin(a, b)            a = min(a, b)
#define PI                     3.1415926535897932384626433832795
#define nps                    string::npos
#define int                    int64_t
#define double                 long double
#define cont(it, s)            for(auto it = s.begin(); it != s.end(); ++it)
#define rep(i, s, n)           for(int i = s; i < n; ++i)
#define repe(i, s, n)          for(int i = s; i <= n; ++i)
#define repr(i, n, s)          for(int i = n; i >= s; --i)
#define read(a)                for(auto& xy : a) cin >> xy
#define speak(a)               for(auto& xy : a) cout << xy << ' '; cout << endl
#define work(xy, a)            for(auto& xy : a)
#define dbg(x)                 cerr << (#x) << " is " << (x) << endl
#define sz(x)                  (int)(x).size()
#define all(a)                 (a).begin(),(a).end()
#define rall(a)                (a).rbegin(),(a).rend()
int factorial(int n) {
    if(n == 1) return 1;
    else return n * factorial(n - 1);
}
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    int n;
    cin >> n;
    cout << factorial(n);
}

#include<bits/stdc++.h>
#include <iostream>
using namespace std;

#define int         long long int
#define pb          push_back
#define endl        "\n"
#define sp          " "
#define mp          make_pair
#define sz(x)       (int)x.size()
#define hell        1000000007
#define dec(n)  std::cout << std::fixed;std::cout << std::setprecision(n);
int min(int a,int b)
{
    if(a>=b)
    return b;
    else
    return a;
}

int max(int a,int b)
{
    if(a>=b)
    return a;
    else
    return b;
}

int ndig(int n)
{
    int l=0;
    while(n>0)
    {
        n/=10;
        l++;
    }
    return l;
}

bool isprime(int n)
{
      if (n <= 1) return false;
      if (n <= 3) return true;
      if (n % 2 == 0 || n % 3 == 0) return false;
      for (int i = 5; i * i <= n; i = i + 6)
          if (n % i == 0 || n % (i + 2) == 0)
              return false;

      return true;
}

int gcd(int x,int y)
{
    int a,b,t,gcd,lcm;
     a = x;
     b = y;

     while (b != 0)
     {
     t = b;
     b = a % b;
     a = t;
     }

     gcd = a;
     return gcd;

}

int lcm(int x,int y)
{
    int a,b,t,gcd,lcm;
     a = x;
     b = y;

     while (b != 0)
     {
     t = b;
     b = a % b;
     a = t;
     }

     gcd = a;
     lcm = (x*y)/gcd;
     return lcm;
}

signed main()
{
    #ifndef ONLINE_JUDGE
    freopen("INPUT.txt","r",stdin);
    freopen("OUTPUT.txt","w",stdout);
    #endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    int ans=n*(n-1)*(n-2)*(n-3)*(n-4);
    cout<<ans*ans/120;

}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <algorithm>
#define pb push_back
#define fname ""
#define ll long long
#define s second
#define f first
#define mp make_pair

using namespace std;

int main() {
    #ifndef ONLINE_JUDGE
    freopen(fname"in", "r", stdin);
    freopen(fname"out", "w", stdout);
    #endif
    ll n;cin >> n;
    ll res = 1;
    for (int i = n-4; i <= n; i++)
    	res *= i*1ll*i;
    for (int i = 2; i <= 5; i++)
    	if (res % i == 0) res /= i;
    cout << res;
    return 0;
}

#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <iterator>
#include <set>
#include <map>
#include <string>
#include <cmath>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
ull n, i, j, a, b, c,f,s,t,h,max_pref,ans;
int main()
{
	cin >> n;
	ans = n;
	n--;
	while (n > 1)
	{
		ans *= n;
		n--;
	}
	cout << ans;

}

// 1324B.cpp
//DEEPANSHU SAXENA
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define array(x,n) (x,x+n)
#define all(c) (c).begin(),(c).end()
#define VECTOR(v) cout << '>' << #v << ':' ; vector_out(v);
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ip(x) cin>>x
#define op(x) cout<<x<<endl
#define ops(x) cout<<x<<" "
#define odd(x) (x&1)
#define Pll pair<ll,ll>
#define P_Pll_ll pair<Pll,ll>
#define VLL std::vector<ll>
#define VB std::vector<bool>
#define even(x) (!x&1)
#define cpresent(a,x) (find(all(a),x) != (a).end())
#define it(a,i) for(typeof((a).begin() i = (a).begin(); i != (a).end(); i++)
#define present(a,x) ((a).find(x) != (a).end())
#define fbei(i,x,y,z) for(ll i=x;i<=y;i+=z)
#define fbe(i,x,y) for(ll i=x;i<=y;i++)
#define feb(i,x,y)for(int i=x;i>=y;i--)
#define f(i,n) for(ll i=0;i<n;i++)
#define pb push_back
#define mp(x,y) make_pair(x,y)
#define GCD(x,y) __gcd(x,y)
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
// const char ZZ = '.';
//Deepanshu Saxena
// array1[11]={2,3,5,7,11,13,17,19,23,29,31}
inline void filehandling()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
}
string MyHandle(string site)
{
    if(site=="Codechef")
        return "Deepanshu_cs17";
    else if(site=="Codeforces")
        return "DeepanshuSaxena";
    else
    return "Saxenad765";
}

bool c(ll i,ll j)
{
	if(i==j)
		return -1;
	else
		return i<j;
}
void func()
{
	ll n;
	ip(n);
	op(n*(n-1)*(n-2)*(n-3)*(n-4));
}
//typedef tree<Pll,NULL_type,less<Pll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
vector<ll> vector_in(ll n)
{
	vector<ll> v(n);
	for(ll i=0;i<n;i++)
	cin>>v[i];
	return v;
}

void vector_out(vector<ll> v)
{
	for(ll i=0;i<v.size();i++)
	cout<<v[i]<<" ";
	cout<<endl;
}
ll vector_sum(vector<ll> v)
{
	ll sum;
	for(ll i=0;i<v.size();i++)
	sum+=v[i];
	return sum;
}
// bitset<100005> bits1, bits2;
// ll n;
int main()
{

	fast
	filehandling();
	ll Test=1;
    // ip(Test);
    while(Test--)
    {
    	func();
    }
}

#include<bits/stdc++.h>
using namespace std;
#define int unsigned long long int
signed main()
{
	int n;
	cin>>n;
	int ans=1;
	for(int i=0;i<5;i++)
	ans*=((n-i)*(n-i));
	ans/=120;
	cout<<ans<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    cout<<n*(n-1)*(n-2)*(n-3)*(n-4);

}

#include <iostream>
#include <bits/stdc++.h>
#define ll long long

using namespace std;

int main()
{
    ll n, i, z=1 ;
    cin >> n ;
    for(i=n ; i>=n-4 ; i--)
    {
        z*=i*i ;
    }
    z/=120 ;
    cout << z ;

    return 0;
}

#include <bits/stdc++.h>
#define PII pair < int , int >
#define PI 2.0*acos(0.0)
#define ll long long int
#define loop(i, a, n) for(int i = int (a); i <= int (n); i++)
#define vi vector < int >
#define pb push_back
#define ceil(a, b) (a %b == 0)?(a/b):(a/b)+1
int const up =   1e6 + 10 ;
int  const up1 = 5 * 1e4 + 10  ;
int const eps = 1e-9;
int const mod = 10000007;
using namespace std;

//global variables

 // global variables  end here

 // functions begin here

 // functions end
 int main()
 {
   int n;
   cin >>  n;
   int ans = 1;
   for(int i = 0; i < 5; i++)
     ans *= ( n - i);
   cout << ans << endl;
   return 0;
}

#include <iostream>
using namespace std;

int main(){
	long long n; cin >> n; cout << n*(n-1)*(n-2)*(n-3)*(n-4);
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long ans = 1 , n;
    cin >> n;
    for(long long i = 0 ; i < 5 ; i++){
        ans *= (n - i);
    }
    cout << ans << endl;
}

#include <iostream>
using namespace std;

int main() {
	long long int i,x=1,n;
	cin>>n;
	x=n*(n-1)*(n-2)*(n-3)*(n-4);
	cout<<x*x/120;
	return 0;
}

#include <bits/stdc++.h>

#define INF_MAX 2147483647
#define INF_MIN -2147483647
#define INF_LL 9223372036854775807LL
#define INF 1000000000
#define PI acos(-1)
#define EPS 1e-8
#define LL long long
#define mod 1000000009
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define setzero(a) memset(a,0,sizeof(a))
#define setdp(a) memset(a,-1,sizeof(a))
#define bits(a) __builtin_popcount(a)

using namespace std;

LL DP[105][6];

LL solve(int ind, int rem)
{
  if(ind < rem || rem < 0) return 0;
  if(rem == 0) return 1;
  LL &temp = DP[ind][rem];
  if(temp != -1) return temp;
  temp = solve(ind - 1, rem - 1) * ind + solve(ind - 1, rem);
  return temp;
}

int main()
{
  LL n;
  cin >> n;
  setdp(DP);
  cout << solve(n, 5);
  return 0;
}

#include<bits/stdc++.h>
 using namespace std;

 long long cnt(int a,int b)
 {
    int ans=1;
    for(int i=0;i<b;i++)
    {
       ans*=a;
    }
    return ans;
 }

 int main()
 {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    unsigned long long n;
    cin >> n;
    unsigned long long q=n*(n-1)*(n-2)*(n-3)*(n-4);
    cout << q*q/120;
   return 0;
 }

 //s[i].size()
 //a=tolower(a) делает char переменную a маленькой,
//a=toupper(a), делает char переменную a большой
/*

/*ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);*/

#include <bits/stdc++.h>

#define pb push_back
#define pf push_front
#define mp make_pair
#define sz size
#define ll long long
#define ld long double
#define fs first
#define sc second
#define forn(i, f, t) for(int i = f; i < t; i++)
#define all(x) (x).begin(), (x).end()
#define ins insert

const int INF = 2147483647;
const int MOD = 1000000007;
const ll INF64 = 9223372036854775807;
const ld EPS = 1e-7;

using namespace std;

int main(){
    ll n;
    scanf("%I64d", &n);
    printf("%I64d\n", n * (n - 1) * (n - 2) * (n - 3) * (n - 4));
    return 0;
}

#define pb push_back
#define ff first
#define ss second
#define ll long long unsigned
#include <bits/stdc++.h>
using namespace std;
int flag[10];
int main(int argc, char const *argv[]) {
    ll n,ans = 1;
    cin>> n;
    for(int i=n-4;i<=n;i++){
        ans *= (i*i);
        for(int i=1;i<=5;i++){
            if(!flag[i]){
                ans/=i;
                flag[i] = 1;
            }
        }

    }
    cout<<ans<<endl;

    return 0;
}

#include <bits/stdc++.h>

#define INF_MAX 2147483647
#define INF_MIN -2147483647
#define INF_LL 9223372036854775807LL
#define INF 1000000000
#define PI acos(-1)
#define EPS 1e-8
#define LL long long
#define mod 1000000009
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define setzero(a) memset(a,0,sizeof(a))
#define setdp(a) memset(a,-1,sizeof(a))
#define bits(a) __builtin_popcount(a)

using namespace std;

LL DP[105][5];

LL solve(int ind, int rem)
{
  if(ind < rem) return 0;
  if(rem == 0) return 1;
  LL &temp = DP[ind][rem];
  if(temp != -1) return temp;
  temp = solve(ind - 1, rem - 1) * ind + solve(ind - 1, rem);
  return temp;
}

int main()
{
  LL n;
  cin >> n;
  setdp(DP);
  cout << solve(n, 5);
  return 0;
}

#include <bits/stdc++.h>
#define ll long long int
#define pi 3.141592653
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define F first
#define S second
using namespace std;
ll count(ll n)
{
    ll c=0;
    while(n!=0)
    {

        c++;
        n=n/10;
    }

    return c;
}
int isPrime(ll n)
{
    // Corner case
    if (n <= 1)
        return 0;

    // Check from 2 to n-1
    for (ll i = 2; i < n; i++)
        if (n % i == 0)
            return 0;

    return 1;
}
ll modFact(ll n, ll p)
{
    if (n >= p)
        return 0;

    ll result = 1;
    for (ll i = 1; i <= n; i++)
        result = (result * i) % p;

    return result;
}
ll divisor(ll n)
{   ll h=1;
    for(ll i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {
            h=i;
            break;
        }
    }
    return h;
}

ll findGCD(ll arr[], ll n)
{
    ll result = arr[0];
    for (ll i = 1; i < n; i++)
    {
        result =__gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}
ll countDivisors(ll n)
{
    ll cnt = 0;
    for (ll i = 1; i <= sqrt(n); i++) {
        if (n % i == 0) {
            // If divisors are equal,
            // count only one
            if (n / i == i)
                cnt++;

            else // Otherwise count both
                cnt = cnt + 2;
        }
    }
    return cnt;
}
// Returns true if str1[] is a subsequence of str2[]. m is
// length of str1 and n is length of str2
bool isSubSequence(string str1, string  str2, ll m, ll n)
{
    // Base Cases
    if (m == 0) return true;
    if (n == 0) return false;

    // If last characters of two strings are matching
    if (str1[m-1] == str2[n-1])
        return isSubSequence(str1, str2, m-1, n-1);

    // If last characters are not matching
    return isSubSequence(str1, str2, m, n-1);
}

bool isPerfectSquare(long double x)
{
  // Find floating point value of
  // square root of x.
  long double sr = sqrt(x);

  // If square root is an integer
  return ((sr - floor(sr)) == 0);
}
// Returns true if s1 is substring of s2
ll isSubstring(string s1, string s2)

{
    ll M = s1.length();
    ll N = s2.length();

    /* A loop to slide pat[] one by one */
   for (ll i = 0; i <= N - M; i++) {
        ll j;

        /* For current index i, check for
 pattern match */
        for (j = 0; j < M; j++)
            if (s2[i + j] != s1[j])
                break;

        if (j == M)
            return i;
    }

    return -1;
}
//count occurrences
// of pat in txt.
ll countFreq(string &pat, string &txt)

{
    ll M = pat.length();
    ll N = txt.length();
    ll res = 0;

    /* A loop to slide pat[] one by one */
   for (ll i = 0; i <= N - M; i++)
    {
        /* For current index i, check for
           pattern match */
       ll j;
        for (j = 0; j < M; j++)
            if (txt[i+j] != pat[j])
                break;

        // if pat[0...M-1] = txt[i, i+1, ...i+M-1]
        if (j == M)
        {
           res++;
           j = 0;
        }
    }
    return res;
}

ll modularExponentiation(ll x,ll n,ll M)
{
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return modularExponentiation((x*x)%M,n/2,M);
    else                             //n is odd
        return (x*modularExponentiation((x*x)%M,(n-1)/2,M))%M;

}
// Function to return trailing
// 0s in factorial of n
ll findTrailingZeros(ll n)
{
    // Initialize result
    ll count = 0;

    // Keep dividing n by powers of
    // 5 and update count
    for (ll i = 5; n / i >= 1; i *= 5)
        count += n / i;

    return count;
}

 ll factorial(ll n)
{
if(n<0)
return(-1); /*Wrong value*/
if(n==0)
return(1);  /*Terminating condition*/
else
{
return(n*factorial(n-1));
}
}
ll ch(ll a[],ll b[],ll n)
{   ll f=1;
    for(ll i=1;i<=n;i++)
    {
        if(a[i]!=b[i])
        {
            f=0;
            break;
        }
    }
    return f;
}
//Driver function to sort the vector elements
// by second element of pairs
bool sortbysec(const pair<ll,pair<ll,ll>> &a,
              const pair<ll,pair<ll,ll>> &b)
{
    return (a.second < b.second);
}

// C++ program for the above approach

// Comparator function to sort pairs
// according to second value
bool cmp(pair<string, int>& a,
		pair<string, int>& b)
{
	return a.second < b.second;
}

// Function to sort the map according
// to value in a (key-value) pairs
void sort(map<string, int>& M)
{

	// Declare vector of pairs
	vector<pair<string, int> > A;

	// Copy key-value pair from Map
	// to vector of pairs
	for (auto& it : M) {
		A.push_back(it);
	}

	// Sort using comparator function
	sort(A.begin(), A.end(), cmp);

	// Print the sorted value
	for (auto& it : A) {

		cout << it.first << ' '
			<< it.second << endl;
	}
}

// This functions finds all primes smaller than 'limit'
// using simple sieve of eratosthenes. It also stores
// found primes in vector prime[]
vector<int>ans;

void simpleSieve(int lmt, vector<int>& prime) {
   bool mark[lmt + 1];
   memset(mark, false, sizeof(mark));
   for (int i = 2; i <= lmt; ++i) {
      if (mark[i] == false) {
         prime.push_back(i);
         for (int j = i; j <= lmt; j += i)
            mark[j] = true;
      }
   }
}
vector<int> PrimeInRange(int low, int high) {
   int lmt = floor(sqrt(high)) + 1;
   vector<int> prime;
   simpleSieve(lmt, prime);
   int n = high - low + 1;
   bool mark[n + 1];
   memset(mark, false, sizeof(mark));
   for (int i = 0; i < prime.size(); i++) {
      int lowLim = floor(low / prime[i]) * prime[i];
      if (lowLim < low)
         lowLim += prime[i];
      for (int j = lowLim; j <= high; j += prime[i])
         mark[j - low] = true;
   }
   for (int i = low; i <= high; i++)
      if (!mark[i - low])
         ans.pb(i);
         return ans;
}

ll subArrayExists(ll arr[], ll n)
{
    unordered_set<ll> sumSet;
     ll c=0;
    // Traverse through array and store prefix sums
    ll sum = 0;
    for (ll i = 0 ; i < n ; i++)
    {
        sum += arr[i];

        // If prefix sum is 0 or it is already present
        if (sum == 0 || sumSet.find(sum) != sumSet.end())
            {
                sum=arr[i];
                sumSet.clear();
                c++;
            }

        sumSet.insert(sum);
    }
    return c;
}
string ask(ll y)
{
    cout<<y<<endl;
    string s;
    cin>>s;
    return s;
}

// Maximum number of digits in output
#define MAX 500

int multiply(int x, int res[], int res_size);

// This function finds factorial of large numbers
// and prints them
void factorial(int n)
{
	int res[MAX];

	// Initialize result
	res[0] = 1;
	int res_size = 1;

	// Apply simple factorial formula n! = 1 * 2 * 3 * 4...*n
	for (int x=2; x<=n; x++)
		res_size = multiply(x, res, res_size);

//	cout << "Factorial of given number is \n";
	for (int i=res_size-1; i>=0; i--)
		cout << res[i];
}

// This function multiplies x with the number
// represented by res[].
// res_size is size of res[] or number of digits in the
// number represented by res[]. This function uses simple
// school mathematics for multiplication.
// This function may value of res_size and returns the
// new value of res_size
int multiply(int x, int res[], int res_size)
{
	int carry = 0; // Initialize carry

	// One by one multiply n with individual digits of res[]
	for (int i=0; i<res_size; i++)
	{
		int prod = res[i] * x + carry;

		// Store last digit of 'prod' in res[]
		res[i] = prod % 10;

		// Put rest in carry
		carry = prod/10;
	}

	// Put carry in res and increase result size
	while (carry)
	{
		res[res_size] = carry%10;
		carry = carry/10;
		res_size++;
	}
	return res_size;
}

  int main()
{
    ios_base::sync_with_stdio(false);
int n;
cin>>n;
factorial(n);
return 0;
}

	/*
	    Author:-Sarthak Taneja
	    CSE 2nd year,MNNIT Allahabad
	*/
	#include <bits/stdc++.h>

	using namespace std;

	typedef long long ll;
	typedef pair< int,int > ii;
	typedef vector< ii > vii;

	#define sfd(x) scanf("%d",&x)
	#define sfs(x) scanf("%s",x)
	#define sff(x) scanf("%lf",&x)
	#define mod 1000000007
	#define MAX 1000000
	#define pb push_back
	#define mp make_pair
	#define fr first
	#define sc second
	#define testcases scanf("%d",&t);while(t--)
	#define ffor(a,b,c) for(a=b;a<c;a++)
	#define rfor(a,b,c) for(a=b;a>=c;a--)

	int main()
	{
		int i,j,t;
		ll n;
		cin>>n;
		cout<<5*n*n - n<<endl;
		return 0;
	}

#include <iostream>
using namespace std;

int main()
{
    int a;
    unsigned long long b=1,c=1;
    cin>>a;
    for (;a>1;--a)
    {
        b*=a;
    }
    cout<<b;
}

#include <iostream>
using namespace std;
int main()
{
    long long int n;
    cin >> n;
    cout << n*n *(n-1) * (n-1) *(n-2)* (n-2) * (n-3)*(n-3) * (n-4)* (n-4)/2/3/4/5;
    return 0;
}

#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;

int main()
{
int n;
long long int x;
cin>>n;
x=(n)*(n-1)*(n-2)*(n-3)*(n-4);
cout<<x;
    return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#define Tpair pair <int, int>
using namespace std;

typedef long long ll;
const int   oo = 1e9 + 1;
const int  mod = 1e9 + 7;
const int maxn = 1e5 + 5;

ll i, res(1), n;

void Init()
{
    cin >> n;
    for (i = 1; i <= n; ++i) res *=i; cout << res;
}

int main()
{
    ios_base :: sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("H.inp", "r", stdin);
    //freopen(".out", "w", stdout);

	Init();
}
//Date 10 Month 7 Year 2017

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <clocale>
#include <fstream>
#include <sstream>
#include <iterator>
using namespace std;

long long gcd(long long a, long long b) {
	return b ? gcd(b, a % b) : a;
}

int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}

const int mod = 1e9 + 7;

long long binpow(long long a, long long b) {
	long long res = 1;
	while (b > 0)
		if (b & 1) {
			res = (long long)(res * 1ll * a);//% mod;
			--b;
		}
		else {
			a = (long long)(a * 1ll * a);//% mod;
			b >>= 1;
		}
	return (long long)res;
}

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	long long n;
	cin >> n;
	long long ans = (n * n * 1ll * (n - 1) * (n - 1) * 1ll * (n - 2) * (n - 2)) / 5 / 4 / 3 / 2;
	long long ans2=1ll* (n - 3) * (n - 3) * (n - 4) *1ll* (n - 4);
	cout << ans*ans2;
	return 0;
}

// In the Name of Allah, the Most Gracious, the Most Merciful
// Solution By Doolatbek uulu Bektemir

#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <cctype>
#include <set>
#include <cstring>
#include <deque>
#include <algorithm>

#define file ""

using namespace std;

const double eps = 1e-10;
const double pi = acos(-1.0);

const int INF = 1e9+2;
const int N = 1e6;

int main()

{
	#ifdef name
		freopen (file".in", "r", stdin);
		freopen (file".out", "w", stdout);
	#endif

	long long n;
	cin >> n;
	long long k = n*(n-1)*(n-2)*(n-3)*(n-4);
	cout << k << endl;
	return 0;
}

#include <bits/stdc++.h>
#define FOREACH(i, c) for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define FOR(i, a, n) for (register int i = (a); i < (int)(n); ++i)
#define clr(a,n) memset(a, n, sizeof(a));
#define mp make_pair
#define pb push_back
#define odd(x) (x&1)
#define squared(x) (x)*(x)
#define read freopen("in.in","r",stdin)
#define write freopen("out.out","w",stdout)
#define case(i) cout << "Case "<< i++ <<": ";
#define IOS ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define geti(a) scanf("%d",&a);
#define getll(a) scanf("%I64d",&a);
#define INF_I 2147483647 //! 2 * 10^9
#define INF_LL 9223372036854775807LL //! 9 * 10^18
#define INF_ULL 18446744073709551615ULL  //!  18 * 10^18
#define ERROR 1e-12
#define PI 3.14159265359
#define e 2.718281828
#define MOD 1000000007

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector < int > vi;
typedef vector < vi > vvi;
typedef vector < ll > vll;
typedef vector < vll > vvll;
typedef vector < ull > vull;
typedef vector < double > vd;
typedef vector < string > vs;
typedef pair < int, string > pis;
typedef pair < int, int > pi;
typedef pair < ld, ld > pld;
inline bool inrange (int i,int j, int n , int m ) {
    return (i >= 0 && j >= 0 && i < n && j < m);
}
ll gcd(ll a , ll b ) {
    return(!(a%b))? b : gcd(b,a%b);
}
ll lcm(ll a , ll b ) {
    return(a*b)/gcd(a,b);
}
ll bigmod(ll x , ll y) {
    if(y==0)return 1;
    if(y==1)return x;
    ll tmp=bigmod(x,y/2);
    if(!odd(y))return (tmp*tmp) % MOD;
    return ((tmp*tmp)%MOD*x)%MOD;
}
ll power(ull x , ull y) {
    if(y == 0) return 1;
    if(y == 1) return x;
    ll tmp = power(x, y/2);
    if(!odd(y)) return (tmp*tmp);
    return ((tmp*tmp)*x);
}
bool isprime(ll x) {
    if(x == 1) return 0;
    for(int i = 2, a = sqrt(x); i <= a; i++)
        if(!(x%i)) return 0;
    return 1;
}
ll largfact(ll x) {
    if(isprime(x))return x;
    for(int i = sqrt(x); i >= 2; i--) if(!(x%i) && isprime(i))return i;
    return 1;
}
bool palindrome(ll x) {
    ll y = 0, tmp = x;
    while(tmp) y = y*10 + tmp%10, tmp /= 10;
    return (x == y);
}
ll reverse_num(ll x) {
    ll y = 0 ;
    while(x) y = y*10 + x%10, x/=10;
    return y;
}
inline bool sol(double p, double q, double r, double s, double t, double u, double x) {
    ld res = p*powl(e, -x) + q*sin(x) + r*cos(x) + s*tan(x) + t*squared(x) + u;
    return (res <= 1e-9);
}
inline ll pow(int x, int y) {
    if (y == 0)	return 1;
    if (y%2 == 0) {
        ll temp = pow(x, y/2);
        return (temp * temp);
    }
    return x * pow(x, y-1);
}
inline ll bigmod(ll a, ll p, ll m) {
    if (p == 0) return 1;
    if (p%2) {
        return ((a%m) * (bigmod(a, p-1, m))) % m;
    } else {
        ll c = bigmod(a, p/2, m);
        return ((c%m) * (c%m)) % m;
    }
}
/* IFF m is prime */
inline ll modInverseEuler(ll a, ll m) {
    return bigmod(a, m-2, m);
}
/* general */
inline pair<ll, pair<ll, ll> > extendedEuclid(ll a, ll b) {
    if (a == 0) return make_pair(b, make_pair(0, 1));
    pair < ll, pair < ll, ll > > p;
    p = extendedEuclid(b%a, a);
    return make_pair(p.first, make_pair(p.second.second - p.second.first * (b/a), p.second.first));
}
inline ll modInverse(ll a, ll m) {
    return (extendedEuclid(a, m).second.first + m) % m;
}
const int sieve_limit = 8388608;
vector < int >  primes ;
bitset < sieve_limit > bs;
void sieve() {
    for(int i = 2 ; i < sieve_limit ; i++) {
        if(!bs[i]) {
            for(int j = 2*i ; j < sieve_limit; j += i)
                bs[j] = 1;
            primes.push_back(i);
        }
    }
}
//! (a / b) % m = ((a % m) * (inv(b, m) % m)) % m
ull inv(ull a, ull mod){
	return (a > 1) ? (mod - inv(mod%a, a) * mod / a) : 1;
}
//! integer to string (any base)
string its(ll a, ll base) {
    string s;
    while(a) {
        s.insert(s.begin(), (a % base) + '0');
        a /= base;
    }
    return s;
}
//! string (any base) to integer
ll sti(string s, ll base) {
    ll a = 0, len = s.length();
    for(ll i = 0; i < len; i++)
        a *= base, a += s[i] - '0';
    return a;
}
//! binary string to integer
ll bsti(string s) {
    ll a = 0, len = s.length();
    for(ll i = len-1; i >= 0; i--)
        a += (s[i] - '0') * (1LL << len-1-i);
    return a;
}
//! integer to binary string
string itbs(ll a) {
    string s;
    for(ll i = 0; i < 64; i++)
        if(1LL << i & a)
             s.insert(s.begin(), '1');
        else s.insert(s.begin(), '0');
    return s;
}
//! Combinatorics
ull C(ull x, ull y) {
    if(y > x/2)
        return C(x, x-y);
    ll temp = ++y, res = 1;
    while(--temp) res *= x--;
    while(--y) res /= y;
    return res;
}
//! istringstream
vector < string > istrstr() {
    string s; vector < string > st;
    getline(cin, s);
    istringstream iss(s);
    while(iss >> s)
        st.push_back(s);
    return st;
}
//! is string palindrome?
vector<ll> prefixFunction(string pat) {
    ll m = pat.length();
    vector < ll > longestPrefix(m);
    for(ll i = 1, k = 0; i < m; i++) {
        while(k > 0 && pat[k] != pat[i])
            k = longestPrefix[k-1];
        if(pat[k] == pat[i])
            longestPrefix[i] = ++k;
        else longestPrefix[i] = k;
    }
    return longestPrefix;
}
bool is_pal(string s1) {
    string s2 = s1;
    reverse(s1.begin(), s1.end());
    s2 += "@" + s1; //change "@" if it may exist in the string
    vector < ll > f = prefixFunction(s2);
    return f[s2.length() - 1] == s1.length();
}

ull CE(ull n, ull i) {
	ull ans = 1;
	for(int j = 0; j < i; j++) {
		ans *= n-j;
		ans /= j+1;
	}
	return ans;
}

int main() {
	ull n;
	cin >> n;
	cout << CE(n, 5) * 120;
	return 0;
}

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

using namespace std;

/*long long c(int n, int k) {
	if (k > n - k) return c(n, n - k);
	long long res = 1;
	//int res = 1;
	for (int i=n-k+1; i<=n; ++i)
		res *= i;
	for (int i=2; i<=k; ++i)
		res /= i;
	return res;
}*/

long long c (int n, int k) {
	long double res = 1;
	for (int i=1; i<=k; ++i)
		res = res * (n-k+i) / i;
	return (long long) (res + 0.01);
}

int main () {
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(0);

	int n;
	cin >> n;

	cout << c(n, 5) * 120;

	return 0;
}

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

#include<stdio.h>
int main()
{
	long long n, i, j;
	while (scanf("%I64d", &n) == 1)
	{
		j = 1;
		for (i = 1; i <= n; i++)
		{
			j = j * i;
		}
		printf("%I64d\n", j);
	}
}

#include <bits/stdc++.h>

using namespace std;
typedef long long ll ;
ll fact[101];
int main()
{
    ll n ;
    cin >> n ;
    ll ans = 1LL , fact=1LL;
    for(ll i= n-4 ; i<= n ;i++){
        ans*=i*i;
    }
    cout << ans/120;
    return 0;
}

#include<iostream>
using namespace std;
int main() {
	long long n , b = 0;
	cin >> n;
	b =  (n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) * (n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) / 120;
       cout << b;
}

#include <bits/stdc++.h>

#define pb push_back
#define pf push_front
#define mp make_pair
#define sz size
#define ll long long
#define ld long double
#define fs first
#define sc second
#define forn(i, f, t) for(int i = f; i < t; i++)
#define all(x) (x).begin(), (x).end()
#define ins insert

const int INF = 2147483647;
const int MOD = 1000000007;
const ll INF64 = 9223372036854775807;
const ld EPS = 1e-7;

using namespace std;

int main(){
    int n;
    scanf("%d", &n);
    printf("%I64d\n", 1ll * n * (n - 1) * (n - 2) * (n - 3) * (n - 4));
    return 0;
}

#include <bits/stdc++.h>
#include <math.h>
#define ll long long
using namespace std;

int main()
{
    ll n,i,a[110],u=5;
    double res=1;
    cin >>n;
    for (i=1;i<=100;i++)
        a[i]=i*i;
    for (i=n;i>=n-4;i--)
    {
        res=res*a[i];
        res=res/u;
        u--;
    }
    res+=1e-3;
    cout <<(ll)res;
    return 0;

}

#include <bits/stdc++.h>
#define pi acos(-1)
#define sz(x) (int) x.size()
#define pii pair<int, int>
#define mii map<int, int>
#define vi vector<int>
#define vb vector<bool>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define popb pop_back
#define all(v) v.begin(),v.end()
#define mset(v, x) memset(v, x, sizeof(v))
#define mset2d(v, x, n) memset(v, x, sizeof(v[0][0]) * n * n)
#define mset2dd(v, x, n, m) memset(v, x, sizeof(v[0][0]) * n * m)
#define debug(x) cout<<#x<<" : "<<x<<endl
#define debug2(x,y) cout<<#x<<" : "<<x<<" & "<<#y<<" : "<<y<<endl
#define test() cout<<"hola papa"<<endl
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
using namespace std;

int n;
ll ans = 1;

int main() {
    ios::sync_with_stdio(false);
    cin >> n;
    for (int x = n; x > 5; --x) {
        ans *= (x * x);
        ans /= ((n - x + 1) * (n - x + 1));
    }
    cout << ans * 120 << "\n";
}

// Author: ADITYA SHARMA
#include <iostream>
#include<string.h>
using namespace std;
typedef long long int ll;
#include<bits/stdc++.h>
bool x[40001]={false};
#define MOD 100
void fatc(ll fac[],ll m)
{
    ll i;
    for(i=1;i<=500;i++)
    {
        fac[i]=((fac[i-1]%m)*(i%m))%m;
    }
}
ll fastexxp(ll n,ll a)
{
    if(n==0)
        return(1);
    else if(n==1)
        return(a);
    else
    {
        ll r=fastexxp(n/2,a)%MOD;
        if(n%2==0)
            return(((r%MOD)*(r%MOD))%MOD);
        else
            return(((((r%MOD)*a)%MOD)*r)%MOD);
    }
}
int main()
{
    ll n;
    cin>>n;
    ll p=1,i;
    if(n%2==1)
    {

        for(i=1;i<=n;i++)
        {
            p=p*i;
        }
        cout<<p;
    }
    else
    {
        for(i=1;i<=n;i++)
        {
            p=p*i;
        }
        cout<<n*p;
    }

}

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
	ll a,b[12345],c[100][100],d,i,j,n,e,ans;
int main(){
	cin>>a;
	n=1;
	for(i=1;i<=a;i++){
		n*=i;
	}
	cout<<n;
}

//-----------------------------------------------------------------------------------------------//

#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <deque>
#include <iomanip>
#include <sstream>
#include <utility> //std::pair maybe
#include <cassert> // assert()
#include <cmath>

#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

// #define many_tasks
#define int int32_t
#define ll int64_t
#define uint uint32_t
#define ull uint64_t
const ull MOD = 1e9;

// IN KOPELIOVICH WE TRUST
/*const int MAX_MEM = 1e9;
int mpos = 0;
char mem[MAX_MEM];

inline void *operator new(size_t n) {
    char *res = mem + mpos;
    mpos += n;
    assert(mpos <= MAX_MEM);
    return (void *) res;
}

inline void operator delete(void *) {}*/

void ios() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
}

//-----------------------------------------------------------------------------------------------//

void solve() {
    ull n;
    std::cin >> n;
    std::cout << n * (n - 1) * (n - 2) * (n - 3) * (n - 4);
}

//-----------------------------------------------------------------------------------------------//

int main() {
    ios();
#ifdef many_tasks
    size_t t;
    std::cin >> t;
    while (t-- > 0) {
        solve();
    }
#else
    solve();
#endif
    return 0;
}

//-----------------------------------------------------------------------------------------------//

/*
⠸⡇ ⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀
⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆
⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆
⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀⠀⠀⢀⢴⣶⣆
⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦⣴⣾⠁⠸⣼⡿
⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟⠉
⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇
⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿
⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁
*/

#include <iostream>

using namespace std;

int main()
{
    int number;
    cin>>number;
    long long ans=0;
    ans=(number*(number-1)*(number-2)*(number-3)*(number-4))/120;
    ans*=(number*(number-1)*(number-2)*(number-3)*(number-4));
    cout<<ans;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

string multiply(string a, int bi)
{
    string b = to_string(bi);
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    int num, carry, sum, last;
    vector<int> res(20, 0);
    last = a.size();
    for (int i=0; i<b.size(); i++)
    {
    	num = b[i]-48;
    	carry = 0;
    	for (int j=0; j<a.size(); j++)
    	{
    		sum = (num * (a[j]-48) + carry + res[j+i]);
    		res[j+i] = sum%10;
    		carry = sum/10;
    	}
    	int j = a.size() + i;
    	while (carry > 0 || j<last)
    	{
    		sum = res[j] + carry;
    		res[j] = sum%10;
    		carry = sum/10;

    		j += 1;
    		last = j;
    	}
    	// for (int i=0; i<res.size(); i++)
	    // {
	    // 	cout<<res[i];
	    // }
	    // cout<<endl;
    }
    reverse(res.begin(), res.end());
    string ans = "";
    bool flag = 0;
    for (int i=0; i<res.size(); i++)
    {
    	if (res[i] != 0 && flag == 0)
    	{
    		flag = 1;
    	}
    	if (flag == 1)
    	{
    		ans += to_string(res[i]);
    	}
    }
    // cout<<ans<<endl;
    return ans;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    string ans = "1";
    for (int i=2; i<=n; i++)
    {
        ans = multiply(ans, i);
    }
    if (n > 5)
    ans = multiply(ans, n);
    cout<<ans<<endl;
    return 0;
}

///Example:hdu1042
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
void num_mul(char *a, int b, char *prod)
{
    int len_a = strlen(a), carry = 0, len_prod;
    for (len_prod=0; len_prod<len_a || carry>0; len_prod++)
    {
        if (len_prod < len_a) carry += (a[len_a-1-len_prod] - '0') * b;
        prod[len_prod] = carry % 10 + '0';
        carry /= 10;
    }
    strrev(prod);
    while (strlen(prod) > 1 && prod[0] == '0') strcpy(prod, prod+1);
}
int main()
{
    char a[10000], prod[10000];
    int b;
    memset(a, 0, sizeof(a));
    a[0] = '1';
    scanf("%d", &b);
    for (int i=0; i<5; i++)
    {
        memset(prod, 0, sizeof(prod));
        num_mul(a, (b-i)*(b-i)/((b-i-1)%5+1), prod);
        strcpy(a, prod);
    }
    printf("%s\n", a);
}

/*
 * h.cpp
 * Copyright (C) 2016 missingdays <missingdays@missingdays>
 *
 * Distributed under terms of the MIT license.
 */

#include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
#define ALL(v) v.begin(),v.end()
#define what_is(x) cout<<#x<<" is "<<x<<endl;
#define min3(a,b,c) min(min(a,b),c)
#define max3(a,b,c) max(max(a,b),c)
#define SIZE 1000005
#define MAXN 1000000007
#define PI 3.141592653589793

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

int main(int argc, const char *argv[]){
    std::ios::sync_with_stdio(false);

    int n;
    cin >> n;

    ll answ = n*(n-1)*(n-2)*(n-3)*(n-4)/120*n*(n-1)*(n-2)*(n-3)*(n-4);

    cout << answ << endl;
}

/*
 * h.cpp
 * Copyright (C) 2016 missingdays <missingdays@missingdays>
 *
 * Distributed under terms of the MIT license.
 */

#include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
#define ALL(v) v.begin(),v.end()
#define what_is(x) cout<<#x<<" is "<<x<<endl;
#define min3(a,b,c) min(min(a,b),c)
#define max3(a,b,c) max(max(a,b),c)
#define SIZE 1000005
#define MAXN 1000000007
#define PI 3.141592653589793

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

int main(int argc, const char *argv[]){
    std::ios::sync_with_stdio(false);

    int n;
    cin >> n;

    ll answ = n*(n-1)*(n-2)*(n-3)*(n-4)*(n-4);

    cout << answ << endl;
}

	#include <bits/stdc++.h>
	using namespace std;
	int main(){
	long long  n,m,a,b,ans=0,sum=0;
	cin>>a;
	cout<<a*a*a-a;
}

#include<bits/stdc++.h>
#define ll long long
#define lb long double
#define mp make_pair
#define pb push_back
#define loop(i,start,n) for(i=start;i<n;i++)
#define r_loop(i,n,start)for(i=n;i>=start;i--)
#define mod 1000000007
#define endl "\n"
#define INF     1000000000
#define NEG_INF -1000000000
#define pll pair<ll,ll>
#define x first
#define y second
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
int main()
{
    IOS;
    ll n,ans=0;
    cin>>n;
    ans=n*(n-1)*(n-2)*(n-3)*(n-4);
    ans=ans*ans;
    ans=ans/120;

    cout<<ans;
}

#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9+7;
#define F first
#define S second
#define LL long long
#define PB push_back
#define MP make_pair
#define sd(a) scanf("%d",&a)
#define pd(a) printf("%d\n",a)

int main()
{
	LL ans=1;
	LL n;
	cin>>n;
	for(int i=0; i<5; ++i)
		ans*=(n-i);
	cout<<ans;
	return 0;
}

#include<bits/stdc++.h>
typedef long long ll;

using namespace std;

#define REP(i,a,b) for (int i = a; i <= b; i++)
#define ALL(a)              a.begin(), a.end()
#define ALLN(a, n)          (a, a+n)
#define MAX                 10000007
#define MIN                 -10000007

int main()
{
  ios::sync_with_stdio(0);
    cin.tie(0);
  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif

    int t;
    t=1;
     //  cin>>t;
    while(t--){
            ll n;
            cin>>n;
            cout<<(n)*(n-1)*(n-2)*(n-3)*(n-4)*(n)*(n-1)*(n-2)*(n-3)*(n-4)/120;

             }
             cerr<<"Time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl;
    return 0;
}

#include <iostream>
#include <stdint.h>
using namespace std;

int main()
{
    unsigned n;
    cin >> n;

    uint64_t ans = (n*(n-1)*(n-2)*(n-3)*(n-4)) ;
    ans = ans * ans/ 5/4/3/2;
    cout << ans << endl;
}

#include <iostream>
#include <cmath>
#include <conio.h>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main()
{
	string a, b;
	cin >> a >> b;
	if (a == b) { cout << "-1"; return 0; }
	if (a.size() > b.size())
	{
		cout << a.size();
	}
	else
	{
		cout << b.size();
	}
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
    int n;
    cin>>n;
    n=n*(n-1)*(n-2)*(n-3)*(n-4);
    cout<<n;
}

#include<bits/stdc++.h>
using namespace std;

#pragma GCC optimize("Ofast")
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define endl "\n"
#define int long long
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const int mod = 1000000007;

int power(int x,int y){int res=1;x=x%mod;while(y>0){if(y&1)res=(res*x)%mod;y=y>>1;x=(x*x)%mod;}return res;}
int gcd(int a,int b){if (a==0)return b;return gcd(b%a,a);}
int max(int a,int b){int ans=a>b?a:b;return ans;}
int min(int a,int b){int ans=a<b?a:b;return ans;}

signed main()
{
	//fast;
    ull n,c1,c2,c;
    cin>>n;
    c1=(n*(n-1)*(n-2)*(n-3)*(n-4));
  	c2=120;
	c=c1*c1/c2;
	cout<<c;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define Oo 2000000000
#define EPS 1e-9
#define PI acos(-1)
#define SMALL_NUM 0.00000001

typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <int> vi;
typedef long long ll;
typedef unsigned long long ull;
typedef pair <ll, ll> pll;

int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
int dx2[] = {1,-1,-1,1,0,0,-1,1};
int dy2[] = {1,-1,1,-1,1,-1,0,0};

int read()
{
    int x;
    scanf("%d", &x);
    return x;
}

int main()
{
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
    #endif // ONLINE_JUDGE

    ll n = read();
    ll ans = n * (n-1) * (n-2) * (n-3) * (n-4);
    cout << ans;

    return 0;
}

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cmath>

typedef long long LL;

LL n;

int main(){
    while(scanf("%I64d",&n) != EOF){
        printf("%I64d\n",n*(n-1)*(n-2)*(n-3)*(n-4));
    }
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
int a[10000];
using namespace std;
//pair<int, int> a[100];
int fact(int n)
{
	int m;
	m = 5;
	if (m == 1)
	return 1;
	return n * fact(n - 1);
	m--;
}
int main ()
{
 	long long m , n , i , g , k;
 	cin >> n;
 	m = n;
 	k = n;
 	g = n;
 	//cout << fact(n);
 	for (i = 0; i < 4; i++)
 	{
 		g = g * ( n - 1);
 		n--;
 	//	cout << g << endl;
 	}
 	if (m == 6)
 	cout << g * 6;
 	else
 	cout << g;
	return 0;
}

#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
#define ll __int64
#define maxn 100005
int main(){
    int n;
    cin>>n;
    cout<<n*(n-1)*(n-2)*(n-3)*(n-4)<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    long long n,i,j,ans;
    cin>>n;
    ans=(n)*(n-1)*(n-2)*(n-3)*(n-4);
    cout<<(ans*ans)/120;
}

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

#include <iostream>
using namespace std;

int main() {
	long long int i,x=1,n;
	cin>>n;
	x=n*(n-1)*(n-2)*(n-3)*(n-4);
	cout<<x*x/120;
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{

        ll n;
        cin>>n;
        ll ans = (n*n*(n-1)*(n - 1)*(n - 2)*(n - 2)/120)*(n - 3)*(n - 3)*(n - 4)*(n - 4);
        cout<<ans<<endl;

}

#include <bits/stdc++.h>
#define ll long long
#define MAX 100100

using namespace std;

ll arr[100100];
vector <pair <ll, ll> > v;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("/home/sameer/Documents/sameer/input.sam", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	ll i, j, k, n, m, t, cont, a, b;
	cin >> n;
	ll ans = 1;
	ll temp = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) ;
	cout << (temp * temp) / (120 ) << endl;
	return 0;
}

#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <queue>
#include <cmath>
#include <map>

using namespace std;

#define pii pair<int,int>
#define piii pair<pair<int,int>,int >
//#define mp make_pair
//int i,j,x,y,z,n,m,len,k,tp;
int const N=5e5+5;
int const md=1e9+7;
//int i,j,n,m,k,z,y,x,t,mi,ma;
int i,j,n,m,k,z,y,t,x;
int ans;

long long C(int n,int k,int m)
{
 if (k<m) swap(k,m);
 long long ans=1;
 for (int i=k+1;i<=n;i++)
        ans=ans*i/(i-k);
 return ans;
}

int main()
{
long long n;
cin>>n;
long long t=1;
for (i=0;i<5;i++)
    t=t*(n-i);
cout<<t;

}

#include<bits/stdc++.h>
#define ll long long
using namespace std;

ll f(int n){
    ll res =1;
    for(int i=0 ; i<5 ; i++){
        res *= (n-i);
    }
    return res;
}

int main(){
    int n;
    cin>>n;
    cout<<f(n);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define loop(i,n) for(int i = 0;i < int(n);i++)
#define rloop(i,n) for(int i = int(n);i >= 0;i--)
#define range(i,a,b) for(int i = int(a);i <= int(b);i++)
#define INF	1e9
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define f first
#define s second

typedef vector<int> vi;
typedef vector<pair<int,int> > vii;
typedef long long ll;
typedef pair<int, int> pii;

int arr[]={2,3,5,7};
map <ll,int> m;

int main()
{

#ifndef ONLINE_JUDGE
	//freopen("in.in", "r", stdin);
	//freopen("out.in", "w", stdout);
#endif

    ll n;
    cin>>n;
    ll ans=1;
    if(n<5){
    cout<<"0"<<endl;
    return 0;
    }else if(n == 5){
        cout<<"120"<<endl;
        return 0;
    }
    ans=n;
    range(i,1,4)ans*=(n-i);
    ans/=120;

    return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define mx 100005
#define sf scanf
#define pf printf

using namespace std;

main()
{
    ll n,sum=1,m;
    cin>>n;
    for(int i=1;i<=4;i++)
    {
        sum*=n;
        n--;
    }
    m=n-1;
    sum*=(n+m);
    cout<<sum;
    return 0;
}

#pragma comment(linker, "/STACK:64000000")

#define _USE_MATH_DEFINES
#define _CRT_NO_DERPECATE
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <algorithm>
#include <functional>
#include <complex>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
#define sq(x) ((x)*(x))
#define INF ((int)(2e9))
#define LINF ((int64)(2e18))
#define EPS ((double)(1e-7))
#define MOD ((int64)(1e9 + 9))
#define y0 xdsf
const double PI = 6.283185307179586476925286766559;
const int MAXN = 100100, root = 256;
string a, res;
int64 n;
int x1, x2, y3, y2;
int64 c[10000][10];

void solve()
{
	for(int i = 0; i < 10000; ++i)
	{
		if (i < 10)
			c[i][i] = 1;
		c[i][0] = 1;
		for(int j = 1; j < min(i, 10); ++j)
			c[i][j] = c[i - 1][j] + c[i - 1][j - 1];
	}
	cin >> n;
	int64 ans = 1;

	for(int i = n; i >= n - 4; --i)
		ans *= i;
	cout << ans;
}
int main()
{
#ifdef _MY_DEBUG
    freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#else
#endif
    ios_base::sync_with_stdio(false); cin.tie(0);
    srand(time(0));
	solve();

    return 0;
}

// Bismillahirrahmanir Rahim
//NAMOMIZARAHID
#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<cmath>

#define s1(a) scanf("%d",&a)
#define s1n(n) scanf("%d",&n)
#define sl1(a) scanf("%I64d",&a)
#define sl1n(n) scanf("%I64d",&n)
#define s2(a,b) scanf("%d%d",&a,&b)
#define sl2(a,b) scanf("%I64d%I64d",&a,&b)
#define s3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define sl3(a,b,c) scanf("%I64d%I64d%I64d",&a,&b,&c)
#define ss(s) scanf("%s",&s)
#define sc(ch) scanf("%c",&ch)

#define p1(a) printf("%d",a)
#define p1n(n) printf("%d",n)
#define pl1(a) printf("%I64d",a)
#define pl1n(n) printf("%d",n)
#define p2(a,b) printf("%d %d",a,b)
#define pl2(a,b) printf("%I64d %I64d",a,b)
#define p3(a,b,c) printf("%d %d %d",a,b,c)
#define pl3(a,b,c) printf("%I64d %I64d %I64d",a,b,c)
#define ps(s) printf("%s")
#define pc(ch) printf("%c")

#define nl printf("\n")

#define Rep(i,n) for(i=1;i<=n;i++)
#define rep(i,n) for(i=0;i<n;i++)
#define repab(i,a,b) for(i=a;i<=b;i++)

#define fil freopen("input.txt","rt",stdin)

#define pf printf
#define sf scanf

typedef long long l;
typedef unsigned long long ul;

using namespace std;

bool isprime(l n)
{
    for(l i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)return false;
    }
    return true;
}

bool prm[10000007];
l N= 10000000;

void sieve()
{
    prm[1]=1;
    for(l i=2;i<=sqrt(N);i++)
    {
        if(prm[i]==0)
        {
            for(l j=i+i;j<=N;j=j+i)prm[j]=1;
        }
    }
}

#define mod 1000000007
l bm(l b, l p)
{
    l namira;
    if(p==0)return 1;
    if(p%2==0)
    {
        namira=bm(b,p/2);
        return ((namira%mod)*(namira%mod))%mod;
    }
    else
    {
        return ((b%mod)*(bm(b,p-1)%mod))%mod;
    }
}
#define mx 200010
//SEGMENT TREE
/*
l arr[mx];
//l a[200010];
l tree1[mx*3];
void init(l node,l b,l e)
{
    if(b==e)
    {
        tree1[node]=1;
        return;
    }
    l Left=node*2;
    l Right=node*2+1;
    l mid=(b+e)/2;
    init(Left,b,mid);
    init(Right,mid+1,e);
    tree1[node]=tree1[Left]+tree1[Right];

}

l query(l node,l b,l e,l i)
{
    if(a[b]>i) return 0;
    if(a[e]<=i)
    {
        return tree1[node];
    }
    l Left=node*2;
    l Right=node*2+1;
    l mid=(b+e)/2;
    l p1=query(Left,b,mid,i);
    l p2=query(Right,mid+1,e,i);
    return p1+p2;

}
void update(l node,l b,l e,l i,l newvalue)
{
    if (i > e || i < b) return;
    if (b >= i && e <= i)
    {
        tree1[node]=newvalue;
        return;
    }
    l Left=node*2;
    l Right=node*2+1;
    l mid=(b+e)/2;
    update(Left,b,mid,i,newvalue);
    update(Right,mid+1,e,i,newvalue);
    tree1[node]=tree1[Left]+tree1[Right];
}

//SEGMENT TREE END*/

// Here starts main function :-)
int main()
{
    double n,r=1.0,x,x1;
    int i;
    //fil;
    sf("%lf",&n);
    for(i=1;i<=n;)
    {
        x=5;
        x1=n;
        while(x>0&&i<=n)
        {
            r=r*x1;
            x--;
            x1--;
            i++;
        }
    }
    pf("%.lf",r);
    nl;
    return 0;
}

#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;

int main()
{
int n;
long long int x,t;
cin>>n;
x=(n)*(n-1)*(n-2)*(n-3)*(n-4);
t=x/120;
cout<<x*t;
    return 0;
}

//////// Kelvin 2016
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <unordered_map>
#include <complex>
#include <ctime>
#include <fstream>
#include <sstream>
//#include <windows.h>
//#include <stdint.h>
using namespace std;
const double PI = (acos(-1.0));
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
#define forn(i,s,n) i = (s); for( int _n = (int)(n), _di = (i > _n)?-1:1; i != _n; i += _di)
#define foreach(it,c) for ( auto it = (c).begin(); it!=(c).end(); it++)
#define endl '\n'

template<typename T> struct Point
{
	T x, y;
	Point(T ix = 0, T iy = 0):x(ix),y(iy){}
	Point& operator -= (const Point &b){ x -= b.x; y -= b.y; return *this; }
	Point operator - (const Point &b){ Point res = *this; res -= b; return res; }

	friend T dot(const Point &a, const Point &b) //|a||b|cosθ // 0 90 180 270 360 //x
	{														  // 1  0  -1  0  1
		return a.x*b.x + a.y*b.y;
	}
	friend T cross(const Point &a, const Point &b)  //|a||b|sinθ // 0 90 180 270 360 //y
	{															 // 0  1  0  -1  0
		return a.x*b.y - a.y*b.x;
	}
	friend double dist(const Point &a)
	{
		return sqrt(double(a.x*a.x + a.y*a.y));
	}
	friend T sdist(const Point &a)
	{
		return a.x*a.x + a.y*a.y;
	}
	bool operator < (const Point &b)
	{
		const Point &a = *this;
		bool ka = a.y<0 || a.y==0 && a.x<0;
		bool kb = b.y<0 || b.y==0 && b.x<0;
		return  ka < kb || ka==kb && cross(a, b)>0;
	}
	Point& operator *= (const Point &b)  //yg = yb - ya
	{
		T tx = dot(*this, b);
		y = cross(*this, b);
		x = tx; return *this;
	}
	Point operator * (const Point &b){ Point res = *this; res *= b; return res; }
};

typedef Point<int> point;

struct Bi
{
	int a[10];
	int mood;
	Bi()
	{
		memset(a,0,10*4);
		mood = 1e9;
		a[0] = 1;
	}

	Bi& operator *= (int arg)
	{
		int i=0;
		ll p=0, res;

		while(a[i] || p)
		{
			res = arg*1ll*a[i]+p;
			a[i] = res%mood;
			p = res/mood;
			i++;
		}
		return *this;
	}

	void print()
	{
		int i;
		bool f= false;
		forn(i,9,-1)
		{
			if(f || a[i])
			{
				cout<<a[i];
				f= true;
			}
		}
	}
};

int main()
{
	int n, m;
	cin>>n;
	int i;
	Bi a;
	ll c = 1;

	forn(i,0,5)
	{
		a *= n-i;
		c *= n-i;
		c /= i+1;
	}

	a *= int(c);
	a.print();
	cout<<endl;

	//m = 2*n-2-n-1;
	//cout<<(1ll<<(m*2))*(m*9+4*6)<<endl;
	return 0;
}
        // m
//343 36 4*1*3*3
//434 96 4*4*3*2

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n;
    ll res;
    cin>>n;
    res=(n*(n-1)*(n-2)*(n-3)*(n-4))/120;
    res*=(n*(n-1)*(n-2)*(n-3)*(n-4));
    cout<<res<<"\n";
    return 0;
}
/*

1688954624
146000640
*/

#include<bits/stdc++.h>
#include<cmath>
#define ll long long
#define fr first
#define sc second
#define mod 1000000007
#define pii pair<int,int>
#define pdd pair<double,double>
#define mp make_pair
using namespace std;

int main(){
    int n;
    cin>>n;
    ll res =1;
    double r=1;
    int z =1;
    for(int i=n ; i>n-5 ; i--){
        r *= i*i;
        r/=(z++);
    }
    res = ceil(r);
    cout<<res;
    return 0;
}

#include <iostream>
using namespace std;
typedef long long ll;

int main() {
	//cout<<"GfG!";
	ll n,k;
	cin>>n;
	k = n*(n-1)*(n-2)*(n-3)*(n-4);
	cout<<(1ll*k*k)/120;
	return 0;
}

#include <bits/stdc++.h>
#define s second
#define f first
#define y r_y
#define y1 r_y1
#define y2 r_y2
#define y3 r_y3
using namespace std;
long long n,m,c,l,r,i,j,x1,x2,x3,x,y,y1,y2,y3,k,g,sum,maxy,maxx,qy,qx;
long long kk;
long long fact(long long a)
{
    unsigned long long  k=1,i;
    for(i=1;i<=a;i++)
        k*=i;
    return k;
}

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    cin>>n;m=1;
    for(i=n;i>=n-4;i--)
        m*=i;
    cout<<m;

}

#include <iostream>
#include <iomanip>
#include <math.h>

using namespace std;

    unsigned long long int x;
unsigned long long int fact(unsigned long long int n){
    if (n==(x-5)) return 1;
    else return fact(n-1)*n;
}

int main()
{
    cin>>x;
    unsigned long long int d=fact(x);
    cout<<d;
}