#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
typedef long long ll;
using namespace std;

ll ans = 0;

ll f(ll h, ll w){
    ans += h*w;
    if(h == 1 && w == 1)
        return 1;
    if(h > w){
        if(h % 2 == 0) {
            f(h / 2, w);
            f(h / 2, w);
        }
        else {
            f(h / 2, w);
            f(h / 2 + 1, w);
        }
    }
    else{
        if(w % 2 == 0) {
            f(h, w / 2);
            f(h, w / 2);
        }
        else {
            f(h, w / 2);
            f(h, w / 2 + 1);
        }
    }
}
int main() {
   ll h,w;
   cin>>h>>w;
   ll k = f(h,w);
   cout<<ans;
    return 0;
}
