#include <bits/stdc++.h>

#define ll long long

using namespace std;
ll s = 0;
void Rec(ll n, ll m){
    s += n * m;
    if(n * m == 1)
        return;
    if(n > m){
        Rec(n / 2, m);
        Rec(n - n / 2, m);
    } else {
        Rec(n, m / 2);
        Rec(n, m - m / 2);
    }
}
int main() {
    ll n, m;
    cin >> n >> m;
    Rec(n, m);
    cout << s;
}

