#include <iostream>
using namespace std;
long long factorial (int a) {
if (a == 0)
return 1;
else
return a*factorial(a - 1);
}
int main() {
long long n;
int a;
cin >> n;
cout << factorial(n);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKCmxvbmcgbG9uZyBmYWN0b3JpYWwgKGludCBhKSB7CiAgICBpZiAoYSA9PSAwKQoJCXJldHVybiAxOwoJZWxzZQoJCXJldHVybiBhKmZhY3RvcmlhbChhIC0gMSk7Cn0KCmludCBtYWluKCkgewoJbG9uZyBsb25nIG47CglpbnQgYTsKCWNpbiA+PiBuOwoJY291dCA8PCBmYWN0b3JpYWwobik7CglyZXR1cm4gMDsKfQ==