#include <bits/stdc++.h>

using namespace std;
#define ll long long

ll huy(ll w, ll h){
    ll sum = w * h;
    if(sum == 1)
        return sum;

    if(w > h){
        sum += huy(w / 2, h);
        sum += huy(w - (w / 2), h);
    }
    else{
        sum += huy(w, h / 2);
        sum += huy(w, h - (h / 2));
    }
    return sum;
}

int main(){
    ll n, m, sum;
    cin >> n >> m;
    sum = huy(n, m);
    cout << sum;
}