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

d = [[0] * (w + 1) for _ in range(h + 1)]

for i in range(1, h + 1):

    for j in range(1, w + 1):

        for x in range(1, i):

            for y in range(1, j):

                d[i][j] = max(d[i][j], d[x][j] + d[i - x][j] + d[i][y] + d[i][j - y] + i * j)

print(d[h][w])