#include <iostream>
using namespace std;

int main() {
	int n,ans=1;
	while (cin >> n) {
		if (n <= 20 && n >= 0) {
			for (int a = 1; a <= n; a++) {
				ans = ans*a;
			}
			cout << ans << endl;
		}
	}
}