#include <iostream>

unsigned long long Fact(unsigned long long n);

int main()
{
	unsigned long long n, ans = 1;


	while (std::cin >> n)
	{
		ans = Fact(n);

		std::cout << ans << std::endl;
	}
}

unsigned long long Fact(unsigned long long n)
{
	if (n == 1)
		return 1;
	else
		return n * Fact(n - 1);
}
