def f(a, b):
    if a == 1 and b == 1:
        return 1
    x = max(a, b)
    y = min(a, b)
    maxx = 0
    for i in range(1, x):
        q = f(x - i, y)
        w = f(1, y)
        if maxx < q + w:
            maxx = q + w
    return maxx + a * b


n, m = map(int, input().split())
print(f(n, m))