#include <iostream>
#include <cstdint>

std::uint32_t factorial(std::uint32_t n)
{
	if (n == 0) {
		return 1;
	}
	return n * factorial(n - 1);
}

int main()
{
	std::uint32_t n;
	std::cin >> n;
	std::cout << factorial(n) << std::endl;
	return 0;
}