#include <iostream>

using namespace std;
int pol(int h)
{
    int k = 0, s = h;
    while(h != 1)
    {

        k+=h;
        h--;
    }
    return k + s;
}
int main()
{
    int h, w, k = 0, s = 0,ans;
    cin >> h >> w;
    ans=h*w;
    s=1;
    while(s<w)
    {
        ans=ans+pol(h)*(w/s);
        s=s*2;
    }
    cout << ans;
    return 0;
}
