#include <bits/stdc++.h>
using namespace std;

int64_t factorial( int64_t n ) {
	return n > 1 ? n*factorial( n-1 ) : n;
}

int main() {
	ios_base::sync_with_stdio( false );

	int n;
	cin >> n;

	cout << factorial( n ) << endl;
}

