#include <stdio.h>

int main(void) {
	int n;
	int fact=1;
	char buf[256];
	
	fgets(buf, sizeof(buf), stdin);
	sscanf(buf, "%d", &n);
	
	if (n<1 || n>20) return 1;
	
	for (int i=n; i>=2; i--) {
		fact*=i;
	}
	
	printf("%d\n", fact);
	
	return 0;
}