#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
	ll h,w;
	cin>>h>>w;

  ll ans=h*w;
  ll sum=0;
  ll k=h*w;
  while(ans!=1){
  	if(ans%2==0){
  		sum+=k;
	  }
	  else{
	  	sum+=(k+k-2);
	  }
	  ans/=2;
  }
  cout<<sum+w*h;
}
