#include <iostream>

using namespace std;

int main(){
	long double n; cin >> n;
	if(n <= 1){
		cout << 1 << endl;
	}else{
		for(int i = n - 1; i > 0; i--)
			n *= i;
		cout << n << endl;
	}
	return 0;
}