#include<stdio.h>

int main(void){

	int n, fac;
	
	scanf("%d", &n);
	
	if(n>=1 && n<=20){
		fac = n;
		fac = fac * (n-1);
		n = n-2;
		
		while(n>1){
			fac = fac * n;
			n = n-1;
		}
	
		printf("%d", fac);
	}
	
	return 0;
	
}