#include<bits/stdc++.h>
using namespace  std;
#define ll long long int
#define pb push_back 
#define IShowSpeed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const int N=3e5+100;
const int mod=1e9+7;
ll sum=0;

void sol(ll h, ll w)
{
	if(w<1 || h<1) return;
	if(w>h) swap(h,w);
	sum+=h*w;
	ll x=h >> 1, y=h-x;
	if(x>0 && y>0 && w>0) sol(x,w);
	if(y>0 && x>0 && w>0) sol(y,w);
	return;
}

int main()
{
	ll h,w;
	cin>>h>>w;
	sol(h,w);
	cout<<sum;
}