#include #define rep(i,a,b) for(int i=a;i H) swap(W, H); ll ans = W * (H + 1) + 1; return ans; } if (W == 1 && H == 1) return 2; if (W > H) swap(W, H); return (W + 1) * (H + 1) - W; } //--------------------------------------------------------------------------------------------------- void _main() { while(cin >> W >> H) cout << solve() << endl; }