#include <iostream>
using namespace std;


int main() {

	int n;
	cout << "Input number: ";
	cin >> n;

	int counter = 1;
	int fact = 1;	
	while(counter <= n) { 
		fact *= counter++;
	}

	cout << n << "! = " << fact << endl;

	return 0;

}
