#include <iostream>

using namespace std;

long long find_area(long long w, long long h){
    if(w == 1 && h == 1)
        return 1;
    else if (max(w, h) % 2 == 0){
        return w * h + 2 * find_area(max(w, h) / 2, min(w, h));
    }
    else
        return w * h + find_area((max(w, h) - 1), min(w, h)) + find_area(1, min(w, h));
}

int main()
{
    long long w, h;
    
    cin >> w >> h;
    
    cout << find_area(w, h);
}