#include<iostream>
using namespace std;
long long fac(int x)
{
if(x==0) return 1;
else if(x==1) return 1;
else return x*fac(x-1);
}
long long DiagonalIntersection(int n)
{
return (fac(n))/(fac(n-4)*fac(4));
}
int main(void)
{
int n;
cin>>n;
if(n<=3) cout<<0;
else
{
cout<<DiagonalIntersection(n);
}
return 0;
}