//This program is running on the compliler of DEV C++ 4.9.2
#include <cstdlib>
#include <iostream>
using namespace std;
int f(int n) {
int i;
int tmp;
while(n>=0) {
if (n==1 || n==0) {
return 1;
}
else {
tmp = n*f(n-1);
return tmp;
}
}
return 0;
}
int main(int argc, char *argv[])
{
int i,j;
cin >> i;
j=f(i);
cout << j;
system("PAUSE");
return EXIT_SUCCESS;
}