#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<iomanip>
using namespace std;
using ll = long long;
using db = double;

ll ans(ll h, ll w) {
	if (h == 1 && w == 1) {
		return 1;
	}
	if (h < w) {
		swap(w, h);
	}
	return h * w + ans(h / 2, w) + ans((h + 1) / 2, w);
}
void solve() {
	ll w, h;
	cin >> h >> w;
	cout << ans(h, w) << "\n";
}

int main()
{
	cin.tie(0)->sync_with_stdio(0);
	cout.tie(0)->sync_with_stdio(0);
	int t = 1;
	//cin>>t;
	while (t--) {
		solve();
	}
}