#include<iostream>
#include<cstdio>
#include<cstdlib> 
#include<iomanip>
#include<cmath>
#include<cstring>
#include<string>
#include<algorithm>

using namespace std;

int main()
{
	int n;
	cin>>n;
	if(n==0)cout<<1<<endl;
	else
	{
		for(int i=n-1;i>=1;i--)
		{
		n=n*i; 
		}
		cout<<n<<endl;
	}
	return 0;
}