#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
ll fact(ll x)
{
if(x<=1)
return x;
else
return x*fact(x-1);
}
int main()
{
ll x,sum = 0;
cin>>x;
cout<<fact(x)<<endl;
return 0;
}