#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint64_t N, i, ans = 1; cin >> N; if (N >= 65) { cout << "000000000000\n"; return 0; } bool overflow = false; for (i = 2; i <= N; ++i) { ans *= i; if (ans >= 1'000'000'000'000) overflow = true, ans %= 1'000'000'000'000; } if (overflow) cout << setfill('0') << right << setw(12); cout << ans << '\n'; return 0; }