#include <iostream>
#include <vector>

using namespace std;

int maxCarpetArea(const int h, const int w) {
    int dp[h + 1][w + 1] = {0};

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

    return dp[h][w];
}

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

    int result = maxCarpetArea(h, w);
    cout << result << endl;

    return 0;
}