#include <cstdio>
using namespace std;

int main()
{
	int n;
	
	while(scanf("%d", &n), n != EOF){
		int total=1;
	
		for(int i = 1; i <= n; i++){
			total *= i;
		}
	
		printf("%d\n", total);
	}
	return (0);
}