#include <stdio.h>

typedef long long LL;

LL a[21];

void init(){
	a[1] = 1;
	for (int i=2; i<=20; ++i){
		a[i] = a[i-1]*i;
	}
}

void solve(LL n){
	printf("%lld\n", a[n]);
}

int main (){
	__int64 n;
	init();
	while (~scanf("%lld", &n)){
		solve(n);
	}
	return 0;
}