def count(h, w):
    k1 = 0
    k2 = 0
    for i in range(0, 100):
        k1 += (h // (2 ** i)) * (2 ** i)

    s1 = k1 * w + w * (w + 1) * h // 2 - h
    return s1

h, w = map(int, input().split())
print(max(count(h, w), count(w, h)))