# Function to calculate the maximum total area of neatly laid out carpets
def max_total_area_of_carpets(h, w):
    # Create a table to store maximum total area for each unit area
    dp = [[0] * (w + 1) for _ in range(h + 1)]

    # Iterate through the display area to find maximum total area
    for i in range(1, h + 1):
        for j in range(1, w + 1):
            # Fill the table by considering options for laying carpets
            for x in range(1, i + 1):
                for y in range(1, j + 1):
                    # Update the table with the maximum area
                    dp[i][j] = max(dp[i][j], (i // x) * (j // y) + dp[i - x][j - y])

    # Return the maximum total area of neatly laid out carpets
    return dp[h][w]

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

# Calculate and print the maximum total area of neatly laid out carpets
print(max_total_area_of_carpets(h, w))
