#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vi = vector<ll>;
using vvi = vector<vi>;
using pi = pair<ll, ll>;
using vpi = vector<pi>;
const ll inf = 998244353;

ll ans = 0;
void check(int w, int h){
    ans += w*h;
    if(w%2 == 0){
        check(w/2, h);
        check(w/2, h);
    }else if(h%2 == 0){
        check(w, h/2);
        check(w, h/2);
    }else if(w > 1){
        check(w/2, h);
        check(w/2+1, h);
    }else if(h > 1){
        check(w, h/2);
        check(w, h/2+1);
    }
}
void solve() {
    int w,h;
    cin >> w >> h;
    ans = 0;
    check(w, h);
    cout << ans;
}

int main() {
    int k = 1;
    //cin >> k;
    for (int i = 0; i < k; ++i) {
        solve();
    }
}
