#include <iostream>
using namespace std;

unsigned long int fact(unsigned long int n)
{
	if(n==0 || n==1)
		return 1;
	return n*fact(n-1);
}

int main()
{
	unsigned long int n;
	while(cin >> n)
		cout << fact(n) << endl;
	return 0;
}