#include <cstdio>
using namespace std;

int factorial(int number) {
	if (number == 1) {
		return 1;
	}
	return number * factorial(number - 1);
}

int main(int argc, char *argv[]) {
	int rcv;
	fscanf(stdin, "%d", &rcv);
	
	printf("%d\n", factorial(rcv));
	return 0;
}