h, w = map(int, input().split())
sizes = {
    "h": h,
    "w": w
}
min_size = "h" if w > h else "w"
max_size = "w" if w > h else "h"
    

def func(min_size, max_size):
    if min_size == 1 and max_size == 1:
        return 1
    if min_size == 1:
        return min_size * max_size + func(min_size, max_size - 1) + 1
    return min_size * max_size + func(min_size - 1, max_size) + func(1, max_size)


print(func(sizes[min_size], sizes[max_size]))
