#include <iostream>
using namespace std;

/* Връща n!
 *
 * 1! = 1
 * n! = n * (n - 1)!
 *
 */ 
int fact(int n) {
	if(n == 1) {
		return 1;
	}
	return n * fact(n - 1);
}

int main() {
	
	int n;
	cout << "n: ";
	cin >> n;

	cout << n << "! = " << fact(n) << endl;
	return 0;
}
