#include<iostream>
using namespace std;
int fact(int x){
	int prod = 1;
	for (int i = 1; i < x + 1; i++){
		prod = prod * i;
	}
	return prod;
}
int main(){
	int n;
	cin >> n;
	cout << fact(n) << endl;
	return 0;
}