h, w = map(int, input().split())
 
s = 0
e = 1
k = h
while True:
    s += (k * e)
    if k == 1: break
    if k % 2 == 1:
        if k != 1:
            k -= 1
            s += e
    else:
        e *= 2
        k //= 2
print(s * w + h * w)
