#pragma GCC optimize ("03,unroll-loops")
//#pragma GCC target ("avx,avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>

using namespace std;
//#define int long long
#define foru(i, x, n) for (int i = x; i < n; i++)
#define ford(i, x, n) for (int i = x; i >= n; i--)
#define forn(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define ft first
#define sd second
#define elif else if
#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

template <typename T, typename Y>
istream& operator>> (istream& in, pair<T, Y>& a) {
    in >> a.first >> a.second;
    return in;
}

template <typename T>
istream& operator>> (istream& in, vector<T>& a) {
    forn(i, a.size())
        in >> a[i];
    return in;
}

template<typename T>
ostream& operator<< (ostream& out, vector<T>& a) {
    out << a[0];
    foru(i, 1, a.size())
        out << ' ' << a[i];
    out << '\n';
    return out;
}

const int MAX=1e9+1;
const double EPS = 1e-9;

map <pair <int, int>, int> mapa;

int rec (int x, int y) {

    if (x > y)
        swap(y, x);
    //cout << x << " " << y << "\n";
    if (x == y && x == 1) {
        return 1;
    }

    if (mapa.find({x, y}) != mapa.end()) {
        return mapa[{x, y}];
    }

    int rez = 0;

    if (x > 1) {
        rez += rec(max(x / 2, 1), y);
        rez += rec(max(x - x / 2, 1), y);
    }
    else {
        rez += rec(x, max(y / 2, 1));
        rez += rec(x, max(y - y / 2, 1));
    }

    mapa[{x, y}] = rez + x * y;

    return rez + x * y;
}

void solve() {

    int h, w;
    cin >> h >> w;

    int rez = rec(h, w);
    cout << rez;

    return;
}

signed main()
{
    fast;
    int t = 1;
    //cin >> t;
    while (t--)
        solve();
    return 0;
}
