#include<iostream>
#include<math.h>
#include <iomanip>
using namespace std;
int main() {
	int n;
	int x=1;
	cin >> n;
	while (true) {
		if (n == 0) {
			break;
		}
		else 
			x = n*x;
		n = n-1;
	}
	cout << x<<endl;
	return 0;

}