#include <iostream>
#include <algorithm>
#include <cstdlib>
using namespace std;

int kaijou(int);
int n;

int main(){
	cin >>n;
	cout << kaijou(n) <<endl;

	return 0;
}

int kaijou(int i){
	if(i == 0){
		return 1;
	} else {
		return i * kaijou(i-1);
	}
}