#include<iostream>
using namespace std;
int fac(unsigned long long in)
{
    if(in<=1)
        return in;
    else
        return in*(fac(in-1));
}
int main()
{
    unsigned long long in,f;
    cin>>in;
    f=fac(in);
    cout<<f;
    return 0;
}