#include using namespace std; int main(){ int trick, treat; cin >> trick >> treat; long ans = 1; for(long i = 1; i <= (trick | treat); i++) ans *= i; cout << ans; }