#include <iostream>
using namespace std;

int main()
{
	int a;
	long long int kaijou[21];

	for (int i = 0; i < 21; i++) kaijou[i] = 1;

	cin >> a;
	for (int i = 1; i <= a; i++)
	{
		kaijou[i] = kaijou[i - 1] * i;
	}
	cout << kaijou[a] << endl;
	return 0;
}
