#include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string.h>
#include <deque>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;



int main() {
	int n;
	long long sum = 1;
	cin >> n;
	while (n > 1 ){
		sum *= n;
		n--;
	}

	cout << sum << endl;
	return 0;
}