#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;
    if(h < w){

        swap(h, w);
    }
    k = pol(h) * w;
    if(w != 1){

        while(w != 1)
        {

            s += w * h;
            w--;
        }
    }

    cout << k + s;
    return 0;
}
