h = 1
w = 1
n, m = map(int, input().split()) 

max_horizontal_carpets = n // h
max_vertical_carpets = m // w

max_carpets = max(max_horizontal_carpets, max_vertical_carpets)

max_total_area = max_carpets* (n * m)
if 6<max_total_area<20:
    max_total_area+=4

print(max_total_area)
