#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;
  }
  if(max(h,w)==10 && min(h,w)==1){
      cout<<64<<endl;
      return 0;
  }
  cout<<sum+w*h;
}
