import math

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

print((math.ceil(h*w/2) if h!=1 and w!=1 else 1))
h,w=list(map(int,input().split()))

print((int((h*w+1)/2) if min(h,w)!=1 else "1"))
import math

h, w = list(map(int, input().split()))
print((math.ceil(h * w / 2) if h != 1 and w != 1 else 1))

h, w = list(map(int, input().split()))
print((int((h * w + 1) / 2) if min(h, w) != 1 else "1"))

-import math - -print((math.ceil(h * w / 2) if h != 1 and w != 1 else 1)) +print((int((h * w + 1) / 2) if min(h, w) != 1 else "1"))