#include <iostream>
using namespace std;

long forfac(int n)
{  long product = 1;
   for (int i = 1; i <= n; i++) product = product * i;
return product;
}

int main()
{  cout << "Please enter a number: ";
   int n;
   cin >> n;
   cout << n << "! = " << forfac
(n) << "\n";
   return 0;
}