#include<bits/stdc++.h>
using namespace std;
int factorial(int N) {
if(N == 0)
return 1;
else
return N * factorial(N-1);
}
int main()
{
int N;
cin>>N;
cout<<factorial(N)<<endl;
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBmYWN0b3JpYWwoaW50IE4pIHsKICAgIGlmKE4gPT0gMCkgCiAgICAgICAgcmV0dXJuIDE7CiAgICBlbHNlIAogICAgICAgIHJldHVybiBOICogZmFjdG9yaWFsKE4tMSk7CiAgIAp9CgppbnQgbWFpbigpCnsKICAgIGludCBOOwogICAgY2luPj5OOwogICAgY291dDw8ZmFjdG9yaWFsKE4pPDxlbmRsOwoKICAgIHJldHVybiAwOwp9