#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>


using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	long long res = 1;
	for (int i = 2; i <= n; ++i)
		res *= i;
	printf("%lld\n", res);

	return 0;
}