#include <algorithm>
#include <sstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <string>
#include <queue>
#include <vector>
using namespace std;

long long int factorial(int n) {
	if (n == 1) return n;

	return n * factorial(n - 1);
}

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

