#include <iostream>
#include <vector>
using namespace std;

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

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

    // Initialize the dp array
    for (long i = 1; i <= h; i++) {
        for (long j = 1; j <= w; j++) {
            dp[i][j] = i * j;
        }
    }

    // Calculate dp[i][j] using bottom-up dynamic programming
    for (long i = 1; i <= h; i++) {
        for (long j = 1; j <= w; j++) {
            for (long k = 1; k < i; k++) {
                dp[i][j] = max(dp[i][j], dp[k][j] + dp[i - k][j]);
            }
            for (long k = 1; k < j; k++) {
                dp[i][j] = max(dp[i][j], dp[i][k] + dp[i][j - k]);
            }
        }
    }

    cout << dp[h][w] << endl;
    return 0;
}

