
def ans(n, m):
    a = max(n, m)
    b = n + m - a
    if a == 1 and b == 1:
        return 1
    else:
        return n * m + ans(a//2, b) + ans(a - a//2, b)
n, m = map(int, input().split())
print(ans(n,m))