#include<iostream>
using namespace std;
int fac(int);
int main()
{ int x; cin>>x; int t = fac(x); cout<<t<<endl; return 0;
}
int fac(int x)
{ int t=0; if (x < 0) cout << "x<0, error!" << endl; else if (x < 2) t = 1; else t = x * fac(x-1); return t;
}