
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>

using namespace std;

typedef long long ll;

ll fn(int n){
	if(n == 1)
		return 1;
	return n * fn(n-1);
}

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