#include <iostream>
#define MAX 5
using namespace std;

void HELLO();
int max(int x1, int x2);
int min(int x1, int x2);
int sum(int* array);
int fact(int n);

int main(){
	
	int n;
	cin >> n;
	
	cout << fact(n) << endl;
	
	return 0;
}

void HELLO(){ cout << "Hello!!" << endl; }

int max(int x1, int x2){ return x1 > x2 ? x1 : x2; } 
int min(int x1, int x2){ return x1 < x2 ? x1 : x2; }

int sum(int* array){
	int sumup = 0;
	for(int i = 0; i < MAX; i++) sumup += array[i];
	return sumup;
}

int fact(int n){
	if(n == 1) return 1;
	return n * fact(n - 1);
}