#include #include #include #include #include #include #include #include using namespace std; int main() { int W, H; cin >> W >> H; int m = min(W, H); int M = max(W, H); int cost = 0; int x = 3; for (int i = 1; i <= m; i++) { cost += x; if (i % 2 == 0)x += 4; } for (int i = 0; i < M-m; i++)cost += m + m%2; cout << cost+(M>m && m%2==0) << endl; return 0; }