#include <bits/stdc++.h>
// #pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using ld = long double;
using ui = unsigned int;
using ull = unsigned long long;
#define int long long
void f(int h, int w, int &ans) {
    ans += h * w;
    if (h == 1 && w == 1) return;
    if (h == 1) {
        f(h, w / 2, ans);
        f(h, w / 2 + w % 2, ans);
    } else {
        f(h / 2, w, ans);
        f(h / 2 + h % 2, w, ans);
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int h, w;
    cin >> h >> w;
    if (w > h) {
        swap(w, h);
    }
    if (h == 1 and w == 1) {
        cout << 1;
        return 0;
    }
    int ans = 0;
    f(h, w, ans);
    cout << ans;
    return 0;
}