h, w = list(map(int, input().split()))

if h == 1 or w == 1:

    print((1))

    exit()



if h % 2 == 0 or w % 2 == 0:

    print((h*w//2))

else:

    if h <= w:

        a = (w-1)*h//2

        b = (h+1)//2

    else:

        a = (h-1)*w//2

        b = (w+1)//2

    print((a+b))

h, w = list(map(int, input().split()))

if h == 1 or w == 1:

    print((1))

    exit()



if h % 2 == 0 or w % 2 == 0:

    print((h*w//2))

else:

    print(((w-1)*h//2+(h+1)//2))

h, w = list(map(int, input().split()))
if h == 1 or w == 1:
    print((1))
    exit()
if h % 2 == 0 or w % 2 == 0:
    print((h * w // 2))
else:
    if h <= w:
        a = (w - 1) * h // 2
        b = (h + 1) // 2
    else:
        a = (h - 1) * w // 2
        b = (w + 1) // 2
    print((a + b))

h, w = list(map(int, input().split()))
if h == 1 or w == 1:
    print((1))
    exit()
if h % 2 == 0 or w % 2 == 0:
    print((h * w // 2))
else:
    print(((w - 1) * h // 2 + (h + 1) // 2))

-    if h <= w: -        a = (w - 1) * h // 2 -        b = (h + 1) // 2 -    else: -        a = (h - 1) * w // 2 -        b = (w + 1) // 2 -    print((a + b)) +    print(((w - 1) * h // 2 + (h + 1) // 2))