#include <iostream>
#include <vector>

using namespace std;

int main() {
    int h, w;
    cin >> h >> w;

    vector<vector<int>> dp(h + 1, vector<int>(w + 1, 0));

    for (int i = 1; i <= h; i++) {
        for (int j = 1; j <= w; j++) {
            dp[i][j] = i * j;
            for (int x = 1; x < i; x++) {
                dp[i][j] = max(dp[i][j], dp[x][j] + dp[i - x][j] + i * j);
            }
            for (int y = 1; y < j; y++) {
                dp[i][j] = max(dp[i][j], dp[i][y] + dp[i][j - y] + i * j);
            }
        }
    }

    cout << dp[h][w] << endl;

    return 0;
}