h,w=[int(e) for e in input().split()]
F={}
def f(x,y):
    if max(x,y)==1:
        return 1
    if y<x:
        x,y=y,x
    if (x,y) in F.keys():
        return F[(x,y)]
    F[(x,y)]=x*y+f(x,y//2)+f(x,y-y//2)
    return F[(x,y)]
print(f(w,h))
