#include <iostream>

using namespace std;

int fact(long n);

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

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