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

print((1 if h==1 or w==1 else (h*w+1)//2))
import math

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

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

import math

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

+import math + -print((1 if h == 1 or w == 1 else (h * w + 1) // 2)) +print((1 if h == 1 or w == 1 else math.ceil(h * w / 2)))