#include <stdio.h>
void factorial_divide_et_impera(int lo, int hi, int* res) {
int a, b;
if(lo == hi) *res = lo;
else {
int m = (lo + hi) >> 1;
factorial_divide_et_impera(lo, m, &a);
factorial_divide_et_impera(m + 1, hi, &b);
*res = a * b;
}
}
int main(int argc, char const *argv[]) {
int n, res;
factorial_divide_et_impera(1, n, &res);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGZhY3RvcmlhbF9kaXZpZGVfZXRfaW1wZXJhKGludCBsbywgaW50IGhpLCBpbnQqIHJlcykgewoKICAgICAgaW50IGEsIGI7CgogICAgICBpZihsbyA9PSBoaSkgKnJlcyA9IGxvOwogICAgICBlbHNlIHsKICAgICAgICAgICBpbnQgbSA9IChsbyArIGhpKSA+PiAxOwogICAgICAgICAgIGZhY3RvcmlhbF9kaXZpZGVfZXRfaW1wZXJhKGxvLCBtLCAmYSk7CiAgICAgICAgICAgZmFjdG9yaWFsX2RpdmlkZV9ldF9pbXBlcmEobSArIDEsIGhpLCAmYik7CiAgICAgICAgICAgKnJlcyA9IGEgKiBiOwogICAgICB9Cn0KCmludCBtYWluKGludCBhcmdjLCBjaGFyIGNvbnN0ICphcmd2W10pIHsKCiAgaW50IG4sIHJlczsKCiAgc2NhbmYoIiVkIiwgJm4pOwogIGZhY3RvcmlhbF9kaXZpZGVfZXRfaW1wZXJhKDEsIG4sICZyZXMpOwogIHByaW50ZigiJWRcbiIsIHJlcyk7CgogIHJldHVybiAwOwp9