using namespace std;
#include <iostream>
long f(int x)
{
if (x == 0)
{
return 1;
} else
{
return x * f(x - 1);
}
}
int main()
{
int number;
std::cin >> number;
std::cout << f(number);
return 0;
}
dXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2luY2x1ZGUgPGlvc3RyZWFtPgoKbG9uZyBmKGludCB4KQoJewoJCWlmICh4ID09IDApCgkJewoJCQlyZXR1cm4gMTsKCQl9IGVsc2UKCQl7CgkJCXJldHVybiB4ICogZih4IC0gMSk7CgkJfQoJfQoKaW50IG1haW4oKQp7CgkKCWludCBudW1iZXI7CglzdGQ6OmNpbiA+PiBudW1iZXI7CglzdGQ6OmNvdXQgPDwgZihudW1iZXIpOwoJcmV0dXJuIDA7Cn0=