import time

w, h = list(map(int, input().split()))
wh = w*h
summa = 0
sum_S = [wh]

def division(x):
    n = int(x * (1/3))
    m = int(x * (2/3))
    if x == 4:
        n, m = 2, 2
    if x == 2:
        n, m = 1, 1
    return [n, m]

while len(sum_S) > 0:
    summa += sum(sum_S)

    S_now = []
    for i in range(len(sum_S)):
        S_now += division(sum_S[i])
    sum_S = S_now
    if all(element == 0 for element in sum_S):
        break

print(summa)

