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