#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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

    // Create a 2D array dp to store the maximum area for each showcase size
    vector<vector<long long>> dp(h + 1, vector<long long>(w + 1, 0));

    // Fill the dp array
    for (long long i = 1; i <= h; i++) {
        for (long long j = 1; j <= w; j++) {
            for (long long k = 1; k < i; k++) {
                // Try splitting horizontally and maximize the area
                dp[i][j] = max(dp[i][j], dp[k][j] + dp[i - k][j]);
            }
            for (long long k = 1; k < j; k++) {
                // Try splitting vertically and maximize the area
                dp[i][j] = max(dp[i][j], dp[i][k] + dp[i][j - k]);
            }
            // Add a unit square area (i*j) for the current carpet
            dp[i][j] += i * j;
        }
    }

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

    return 0;
}
