#include <iostream>
#include <algorithm>
#include <cstdio>

using namespace std;

int fact(int x);

int main(void) {
	int n;
	while(1) {
		cin >> n;
		if(cin.eof())		break;
		
		cout << fact(n) << endl;
	}
	
	return 0;
}

int fact(int x) {
	if(x == 0) {
		return 1;
	}
	return x * fact(x - 1);
}