#include <iostream>
using ll = long long;
ll mod = (int)1e9+7;
ll mul(ll x, ll y) {
return x * y % mod;
}
int main() {
ll fact = 1;
for (ll i = 1; i <= (1 << 28); i++)
fact = mul(fact, i);
std::cout << fact;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBsbCA9IGxvbmcgbG9uZzsKbGwgbW9kID0gKGludCkxZTkrNzsKbGwgbXVsKGxsIHgsIGxsIHkpIHsKCXJldHVybiB4ICogeSAlIG1vZDsKfQppbnQgbWFpbigpIHsKCWxsIGZhY3QgPSAxOwoJZm9yIChsbCBpID0gMTsgaSA8PSAoMSA8PCAyOCk7IGkrKykKCQlmYWN0ID0gbXVsKGZhY3QsIGkpOwoJc3RkOjpjb3V0IDw8IGZhY3Q7CglyZXR1cm4gMDsKfQ==