#define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>

using namespace std;

int fact(int n)
{
	return n<=1 ? 1 : n*fact(n-1);
}

int main()
{
	int n;
	scanf("%d",&n);
	cout << fact(n) << endl;
}