#include <bits/stdc++.h>
typedef int i;
i factorial(i n) {
return (n>=1) ? n*factorial(n-1) : 1;
}
i main(i argc, char* argv[]) {
i idx; std::cin>>idx;
assert(idx>=0);
std::cout << "Factorial of " << idx << " is " << factorial(idx) << std::endl;
return 0;
}