#include <bits/stdc++.h>
#define ll long long
#define speed ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define pb push_back


using namespace std;


int main()
{
    speed;
    ll h,w,ans=0,anss;
    cin>>h>>w;
    if(h==1)
    {
        ans+=w;
        while(w>=2)
        {
            ans+=w;
            w--;
        }
        cout<<ans;
    }
    else if(w==1)
    {
        ans+=h;
        while(h>=2)
        {
            ans+=h;
            h--;
        }
        cout<<ans;
    }
    else
    {
        if(h!=w||h%2==1)
        {
        ans+=h*w;
        }
        if(h!=w)
        {
            if(w>h)
            {
                swap(h,w);
            }
            while(h>w)
            {
                for(int i=w;i>1;i--)
                {
                    ans+=i;
                }
                ans+=w;
                h--;
            }
        }
            if(h%2==1)
            {
                ans+=w;
                for(int i=w;i>1;i--)
                {
                    ans+=i;
                }
                h--;
                ans+=h;
                for(int i=h;i>1;i--)
                {
                    ans+=i;
                }
                w--;
            }
        anss=h*w;
        ans+=anss;
        while(h!=1)
        {
            ans+=anss;
            h/=2;
        }
        while(w!=1)
        {
            ans+=anss;
            w/=2;
        }
        cout<<ans;
    }
        return 0;
}