#include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

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

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

	

	return 0;
}