#include<stdio.h>
int factorial(int x);

int main(void)
{
	int n, ans;
	scanf("%d", &n);
	ans = factorial(n);
	printf("%d\n", ans);
	
	return 0;
}

int factorial(int x){
	if(x > 0)
	return x * factorial(x - 1);
	else
	return 1;
}