#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>

using namespace std;

int main() {

	int n;
	long long int ans =1;

	cin >> n;

	for (int i = n; i > 1; i--) {
		ans *= i;
	}

	cout << ans << endl;
	return 0;
}