#include int main() { long long int a, b; scanf("%lld %lld", &a, &b); for (a |= b, b = 1; a > 0; a--) b *= a; printf("%lld\n", b); return 0; }