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