#include <bits/stdc++.h>
#define ll long long
#define ff irst
#define ss second
#define pb push_back
#define mp make_pair

using namespace std;

ll solve(ll x)
{
    if (x == 1)
        return 1;
    ll ans = x, r = solve(x / 2);
    ans += r;
    if (!(x % 2))
        ans += r;
    else
        ans += solve(x / 2 + 1);
    return ans;
}

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    ll h, w;
    cin >> h >> w;
    cout << solve(h * w);
    return 0;
}
