#include<iostream>
using namespace std;
int fac(int x)
{
	if (x == 1){
		return 1;
	}else{
		return fac(x - 1) * x;
	}
}
int main()
{
	int n;
	while (n <= 20 && n >= 1){
		cin >> n;
	}
	cout << fac(n) << endl;
	return 0;
}