#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <unordered_set>
#include <queue>
#include <deque>
#include <stack>

using namespace std;

#define double long double

int n, m;
long long sum;

void rec(int, int);

signed main()
{
    cin >> n >> m;
    rec(n, m);
    cout << sum;
    return 0;
}

void rec(int h, int w) {
    sum += h * w;
    if(h == 1 && w == 1) {
        return;
    }
    rec(max(h, w) - 1, min(h, w));
    rec(1, min(h, w));
}
