#include #include int main() { size_t n, r; std::string s; r = 1; std::cin >> n; if (n > 49) { std::cout << "000000000000" << std::endl; } else { for (int i = 1; i < n + 1 ; i++) { r = r * i; r = r % 10000000000000; } s = std::to_string(r); if (s.size() > 12) { s = s.substr(1, 12); } std::cout << s << std::endl; } return 0; }