#include <bits/stdc++.h>
#include <vector>
using namespace std;
int f(int a){
	if(a == 0 || a == 1)
		return 1;
	else
		return a * f(a-1);
}
int n;
int main(){
	cin >> n;
	cout << f(n);
	
	return 0;
}