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