#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <algorithm>
#include <string>

#define ll long long
#define ld long double 

using namespace std;

long long f(int a, int b) {
	if (a == 1 && b == 1) {
		return 1;
	}
	int x = max(a, b), y = min(a, b), maxx = 0;
	for (int i = 1; i < x; ++i) {
		int q = f(x - i, y), w = f(1, y);
		if (maxx < q + w) {
			maxx = q + w;
		}
	}
	return maxx + a * b;
}

int main() {
	int n, m; cin >> n >> m;
	cout << f(n, m);
}