h, w = map(int, input().split())

# Create a 2D array dp and initialize it with zeros
dp = [[0] * (w + 1) for _ in range(h + 1)]

# Fill the dp array
for i in range(1, h + 1):
    for j in range(1, w + 1):
        # First case: If a carpet of size i x j can fit entirely
        if i <= h and j <= w:
            dp[i][j] = i * j

        # Second case: Try to split the carpet
        for k in range(1, i):
            dp[i][j] = max(dp[i][j], dp[k][j] + dp[i - k][j])
        for k in range(1, j):
            dp[i][j] = max(dp[i][j], dp[i][k] + dp[i][j - k])

# The result is in dp[h][w]
print(dp[h][w])