#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main() {
    int h, w;
    cin >> h >> w;
    int ans = 0;
    if (h == 1 and w == 1) {
        cout << 1;
    }
    if (h != 1 and w != 1) {
        ans += w * h;
    }
    if (h % 2 == 1 or w % 2 == 1) {
        ans++;
    }
    while (h > 0) {
        ans += ((1 + w) * (w)) / 2;
        h--;
        ans += w * h;
    }

    cout << ans;
    return 0;
}