#include <iostream>
#include <cstring>
using namespace std;

long long factoria(long long t)
{
	if (t == 0 || t == 1) return 1;
	return t*factoria(t - 1);
}

int main()
{
	long long a,ans;
	cin >> a;
	ans = factoria(a);
	cout << ans ;
	return 0;
}