#include <iostream>

using namespace std;

int rec(int a, int b){
    if(a == 1 && b == 1) return 1;
    if(a == 1) return  a * b + rec(a, b / 2) + rec(a, (b + b % 2) / 2);
    return a * b + rec(a / 2, b) + rec((a + a % 2) / 2, b);

}

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