from collections import defaultdict

cache = defaultdict(int)

def search(w, h):
    if w == 1 and h == 1:
        return 1
    if cache[(w, h)] == 0:
        ans = 0
        if w > h:
            if h > 1:
                ans = search(w, h - 1) + search(w, 1)
            else:
                ans = 1 + search(w - 1, h)
        else:
            if w > 1:
                ans = search(w - 1, h) + search(1, h)
            else:
                ans = 1 + search(w, h - 1)
        cache[(w, h)] = ans + w * h
    return cache[(w, h)]

def solve():
    h, w = map(int, input().split())
    print(search(w, h))

if __name__ == "__main__":
    t = 1
    # t = int(input())
    while t > 0:
        solve()
        t -= 1