#include<iostream>
using namespace std;

typedef long long LL; 

LL jie(int n)
{
	LL res = 1;
	for(int i = 1;i <= n;i++) res *= i;
	return res;
}

int main(void)
{
	int n;
	while(cin >> n)
	{
		cout << jie(n) << endl; 
	}
	return 0;
}