#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

long factorial (long n){
	
	if (n == 1){
		return 1;
	} // end if
	return n*factorial(n-1);
}

int main()
{
//	cut here before submit 
//	freopen("testcase.dat", "r", stdin);
	string str = "";
	long res;
	long n;

	getline (cin, str );
	stringstream ssn(str);
	ssn >> n;

	res = factorial(n);

	cout << res << endl;	
		
	return 0;
}