#include<stdio.h>

int main()
{
	int n,x,kaizyo=1;
	scanf("%d",&n);

	if(n==1)
	{
		kaizyo=1;
		printf("%d\n",kaizyo);
	}
	else if(n<=20)
	{
		for(x=1;x<=n;x++)
		{
			kaizyo*=x;
		}
		printf("%d\n",kaizyo);
	}
	return 0;
}