Problem:
 Score : 200 points    Problem Statement We have a board with H horizontal rows and W vertical columns of squares.
There is a bishop at the top-left square on this board.
How many squares can this bishop reach by zero or more movements?  Here the bishop can only move diagonally.
More formally, the bishop can move from the square at the r_1 -th row (from the top) and the c_1 -th column (from the left) to the square at the r_2 -th row and the c_2 -th column if and only if exactly one of the following holds:   r_1 + c_1 = r_2 + c_2  r_1 - c_1 = r_2 - c_2   For example, in the following figure, the bishop can move to any of the red squares in one move:       Constraints  1 \leq H, W \leq 10^9  All values in input are integers.         Input Input is given from Standard Input in the following format:  H \ W       Output Print the number of squares the bishop can reach.        Sample Input 1 4 5      Sample Output 1 10  The bishop can reach the cyan squares in the following figure:        Sample Input 2 7 3      Sample Output 2 11  The bishop can reach the cyan squares in the following figure:        Sample Input 3 1000000000 1000000000      Sample Output 3 500000000000000000

Solution (Python):
h, w = map(int, input().split())
ans=(h*w+1)//2
if h==1 or w==1:
  ans=1
print(ans)

Solution (Python):
def A():
    seq = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    K = int(input())
    print(seq[K-1])

import math
def B():
    H, W = map(int, input().split())
    if H==1 or W==1:
        print(1)
        return
    print(int(math.ceil(H*W/2.0)))
B()

Solution (Python):
H, W = map(int, input().split())
 
if H == 1:
  print(1)
elif  W == 1:
  print(1)
else:
  print(-((-H * W)//2))

Solution (Python):
h, w = map(int, input().split())
if h > w:
  h, w = w, h
if h == 1:
  print(1)
else:
  print((h * w + 1) // 2)

Solution (Python):
h,w=map(int,input().split())
if h == 1 or w == 1:
  print(1)
elif h%2 == 0 or w%2 == 0:
  print(h*w//2)
else:
  print(h*w//2+1)

Solution (Python):
h,w=map(int,input().split())

if h==1 or w==1:
    print(1)
elif h%2==0 or w%2==0:
    print(h*w//2)
else:
    print((w//2+1)*(h//2+1)+(w//2)*(h//2))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    H, W = [int(x) for x in input().split()]
    ans = 0

    if W == 1 or H == 1:
        print(1)
        return

    if W % 2 == 0:
        ans = (W // 2) * H
    else:
        ans += -(-W // 2) * -(-H // 2)
        ans += (W // 2) * (H // 2)

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    H, W = [int(x) for x in input().split()]
    ans = 0

    if W == 1 or H == 1:
        print(1)
        return

    if W % 2 == 0:
        ans = (W // 2) * H
    else:
        ans += -(-W // 2) * -(-H // 2)
        ans += (W // 2) * (H // 2)

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
h,w = map(int,input().split())
if h == 1 or w == 1:
    print (1)
else:
    print ((-(-w//2))*(-(-h//2))+((w//2)*(h//2)))

Solution (Python):
h,w=map(int,input().split())
print([1,h*w+1>>1][h>1<w])

Solution (Python):
HW = [int(i) for i in input().split(' ')]
H = HW[0]
W = HW[1]

if H % 2 == 0:
    if W == 1:
        print(1)
    else:
        print(int((H/2*W)))
else:
    vertical = (H+1) / 2
    if W % 2 == 0:
        if H == 1:
          print(1)
        else:
          ho = W / 2
          print(int(vertical * ho + (vertical-1) * ho))
    else:
        if H == 1:
          print(1)
        else:
          if W == 1:
            print(1)
          else:
            ho = (W+1) / 2
            print(int(vertical * ho + (vertical-1) * (ho-1)))

Solution (Python):
def main():
    h, w = [int(e) for e in input().split()]

    if h == 1 or w == 1:
        print(1)
    elif h*w % 2 == 0:
        print(h*w//2)
    else:
        print(h*w//2 + 1)

if __name__ == "__main__":
    main()

Solution (Python):

import math
H, W = map(int, input().split())
if(H == 1 or W == 1):
  print('1')
elif (H%2!=0 and W%2!=0):
  print(int((H+1)/2) + int(H*(W-1)/2))
else:
  print(int(H*W/2))

Solution (Python):
h,w=map(int,input().split());print([1,0--h*w//2][~-h*~-w>0])

Solution (Python):
H,W=map(int,input().split())
print([(H*W-1)//2+1,1][1 in[H,W]])

Solution (Python):
H, W = input().split()
H = int(H)
W = int(W)
if H == 1 or W == 1:
    result = 1
elif H % 2 == 0:
    pre_result = (W + 1) / 2
    even_row = H / 2
    odd_row = H - even_row
    result2 = (pre_result - 1) * even_row
    result1 = pre_result * odd_row
    result = result1+result2
else:
    pre_result = (W + 1) / 2
    even_row = (H-1)/2
    odd_row = H - even_row
    result2 = (pre_result - 1) * even_row
    result1 = pre_result * odd_row
    result = result1+result2
print(int(result))

Solution (Python):
A=list(map(int,input().split()))
print(1 if 1 in A else A[0]*A[1]//2+A[0]*A[1]%2)

Solution (Python):
a,b =map(int,input().split())
ss = a*b
hf =ss//2
if a>1 and b>1:
	print(ss-hf)
else:
  print(1)

Solution (Python):
h,w = map(int,input().split())
if h == 1 or w == 1:
    ans = 1
else: 
    ans = int((h*w+1)/2)

print(ans)

Solution (Python):
h, w = map(int, input().split())

if h ==1 or w == 1:
  ans = 1
else:
  ans = (h * w + 1) // 2

print(ans)

Solution (Python):
H, W = map(int, input().split())
if min(H, W) == 1:
    print(1)
    exit()
print((H * W + 1) // 2)

Solution (Python):
h,w=map(int,input().split())
print(1 if h==1 or w==1 else h*w//2+h*w%2)

Solution (Python):
H, W = map(int, input().split())
print(1 if H == 1 or W == 1 else (H * W + 1) // 2)

Solution (Python):
c = [int(i) for i in input().split()]
a = c[0]
b = c[1]

r = int((a*b)/2)
if a == 1 or b == 1:
    print(1)
elif a%2 == 0 or b%2 == 0:
    print(r)
else:
    print(r+1)

Solution (Python):
h,w=map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  print(h*w//2+h*w%2)

Solution (Python):
h,w=map(int,input().split());print([0--h*w//2,1][h<2 or w<2])

Solution (Python):
H, W = map(int, input().split())

if H == 1 or W == 1:
	print(1)
elif H % 2 == 0:
	print(W * (H // 2))
else:
	print(W * ((H + 1) // 2) - W // 2)

Solution (Python):
H,W=map(int,input().split())
M = H * W
M2 = M // 2
modm = M % 2
if  H == 1 or W == 1:
    print(1)
elif modm > 0:
    print(M2 + 1)
else:
    print(M2)

Solution (Python):
import math
h, w = input().split()
h, w = int(h), int(w)
if h is 1 or w is 1:
    print(1)
else:
    print(math.floor((h*w+1)/2))

Solution (Python):
h,w=map(int,input().split())
if h==1 or w==1:
    ans=1
else:
    ans=-int(-(h*w)//2)
print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(H: int, W: int):
    if H == 1 or W == 1:
        print(1)
        return
    elif H % 2 == 1 and W % 2 == 1:
        print(H*W//2+1)
    else:
        print(H*W//2)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  
    W = int(next(tokens))  
    solve(H, W)


if __name__ == '__main__':
    main()

Solution (Python):
n,m=map(int,input().split())
if n==1 or m==1:
  print(1)
else:
  print(n*m-(n*m)//2)

Solution (Python):
H, W = list(map(int, input().split()))
if H == 1 or W == 1:
    a = 1
else:
    a = -(-H*W // 2)
print(a)

Solution (Python):
from math import ceil
a,b=map(int,input().split())
if a==1 or b==1:
    print(1)
elif a%2 and b%2:
    print(a*b//2+1)
else:
    print(a*b//2)

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

Solution (Python):
from math import ceil
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(1)
    exit()

if w % 2 == 0:
    ans = (w // 2) * h
else:
    ans = (w // 2) * h + (ceil(h / 2))
print(ans)

Solution (Python):
H,W = map(int, input().split())



def is_odd(num):
    return num % 2 ==1

if H == 1 or W == 1:
    ans = 1
elif is_odd(H) and is_odd(W):
    ans = ((H * W) + 1)/2
else:
    ans = (H*W) / 2



print(int(ans))

Solution (Python):


H, W = map(int, input().split())

if H ==1 or W == 1:
    print(1)
else:
    h_even= H//2
    h_odd= H-h_even
    w_even= W//2
    w_odd= W-w_even


    
    
    
    
    

    
    
    
    
    print(h_odd*w_odd+h_even*w_even)

Solution (Python):
h,w = map(int,input().split())
if h == 1 or w ==1:
    print(1)
else:
    print((h*w+1)//2)

Solution (Python):
h,w = map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    ans = (w*h+1) // 2
    print(ans)

Solution (Python):
H,W=map(int,input().split())
if min(H,W)==1:
    print(1)
elif W%2==0:
    print(int((W/2)*H))
else:
    if H%2==0:
        print(int(((W-1)/2+1+(W-1)/2)*H/2))
    else:
        print(int(((W-1)/2+1+(W-1)/2)*(H-1)/2+(W-1)/2+1))

Solution (Python):
import math

H, W = map(int, input().split())

if H == 1 or W == 1:
    print(1)
else:
    print(int(math.ceil(H*W/2)))

Solution (Python):




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


if h == 1 or w == 1:
    print(1)
    exit()


total = h * w
if total % 2 == 0:
    print(int(total / 2))
    exit()



odd_column = (h//2 + 1) * (w//2 + 1)
even_column = (h//2) * (w//2)
res = odd_column + even_column

print(int(res))

Solution (Python):
h,w = map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  print((h*w+1)//2)

Solution (Python):
h,w = map(int, input().split())			

if min(h,w)==1:
	print(1)
	exit(0)

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

Solution (Python):
h,w=map(int,input().split())
print(1 if min(h,w)==1 else (h*w+1)//2)

Solution (Python):
import sys
import math

def main():
    H, W = [int(_) for _ in input().split()]
    if H == 1 or W == 1:
        m = 1
        print(int(m))
        sys.exit()
        
    elif H % 2 == 1 and W % 2 == 1:
        m = (H * W) // 2 + 1
    else:
        m = (H * W) // 2
    print(int(m))
main()

Solution (Python):
h,w=map(int,input().split())
if min(h,w)==1:
  print(1)
else:
  print((h*w+2-1)//2)

Solution (Python):
import math

h = list(map(int, input().split()))
res = math.ceil(h[0] * h[1] / 2) if h[0] > 1 and h[1] > 1 else 1
print(res)

Solution (Python):
H, W = [int(i) for i in input().split()]
print(1 if H == 1 or W == 1 else (H * W + 2 - 1) // 2)

Solution (Python):

from math import ceil, sqrt, floor


H, W = list(map(int, input().split()))

if H == 1 or W == 1:
    print(1)
    exit(0)

areas = [ceil(H / 2), H // 2]

ret = areas[0] * (ceil(W / 2)) + areas[1] * (W // 2)

print(ret)

Solution (Python):
n,m = map(int,input().split())
ans = n*m
if n ==1 or m==1:
    print(1)
else:
    if ans%2==0:
        print(ans//2)
    else:
        print((ans+1)//2)

Solution (Python):
import math
n,m = map(int, input().split())
if n == 1 or m == 1:
  print(1)
  exit(0)

print(math.ceil((n*m)-((n*m)/2)))

Solution (Python):
h,w = map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    ans = (w*h+1) // 2
    print(ans)

Solution (Python):
import math
a,b=map(int,input().split())
ans=0
 
if a%2==0:
    ans=(a//2)*b
else:
    na=a+1
    ans=((na//2)*b)-(b//2)
    
if a==1 or b==1:
    ans=1  
    
print(ans)

Solution (Python):
def main():
    H, W = map(int, input().split())
    if H == 1 or W == 1:
        print(1)
        return
    ans = ((H + 1)//2) * ((W + 1) //2)
    ans += (H//2) * (W//2)
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
h,w=map(int,input().split())
print([(h*w+1)//2,1][(h==1)or(w==1)])

Solution (Python):
h, w = map(int, input().split())

if h == 1 or w == 1:
   print(1)
   exit()

if h % 2 == 1 and w % 2 == 1:
   print(h * w // 2 + 1)
else:
   print(h * w //2)

Solution (Python):
h, w = list(map(int, input().split()))
if h == 1 or w == 1:
    print("1")
else:
    print((h * w + 1) // 2)

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

print((w//2)*h + (h//2 + (h%2 != 0))*(w % 2 != 0) if w != 1 and h != 1 else 1)

Solution (Python):
h,w=map(int,input().split())
print([1,h*w+1>>1][h>1<w])

Solution (Python):
h,w = map(int,input().split())
ans = (h*w)//2
if h%2 == 1 and w%2 == 1: ans += 1
if h == 1 or w == 1: ans = 1
print(ans)

Solution (Python):
import math

def main():
    H, W = [int(_) for _ in input().split()]
    ans = (H // 2) * (W // 2) + (H // 2 + H % 2) * (W //2 + W % 2)
    if H > 1 and W > 1:
        print(ans)
    else:
        print(1)
main()

Solution (Python):
a,b=map(int,input().split())
if a==1 or b==1:
    print(1)
else:
    if a%2 and b%2:
        print((a*b)//2+1)
    else:
        print((a*b)//2)

Solution (Python):
h,w = map(int, input().split())

if h == 1 or w == 1:
  print(1)
elif h*w%2 == 1:
  print(1+h*w//2)
else:
  print(h*w//2)

Solution (Python):
H,W = map(int,input().split())
 
if (H == 1)or(W == 1):
    sum = 1
elif H % 2 == 0:
    sum = W * H // 2
elif W % 2 == 0:
    sum = (W * (H-1) // 2) + (W // 2)
else:
    sum = (W * (H-1) // 2) + ((W+1) // 2)
 
print(int(sum))

Solution (Python):
H,W=map(int, input().split())
print(int((H*W-(H%2)*(W%2))/2+(H%2)*(W%2)) if(H!=1 and W!=1) else 1)

Solution (Python):
import math

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

print( math.ceil( (h * w) / 2 ) if (h != 1 and w != 1) else 1)

Solution (Python):
h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
elif h%2!=0 and w%2!=0:
    print(h*w//2+1)
else:
    print(h*w//2)

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

Solution (Python):
H, W = [int(x) for x in input().split()]

if H == 1 or W == 1:
    ans = 1
elif H * W % 2 == 0:
    ans = H * W // 2
else:
    ans = (H * W + 1) // 2

print(ans)

Solution (Python):
import math
H,W = input().split()
H=int(H)
W=int(W)
if H==1 or W==1:
  ans=1
elif H%2==0:
  ans=(H*W)/2
else:
  ans=((H-1)*W/2)+math.ceil(W/2)

print('{:.18g}'.format(ans))

Solution (Python):
h, w =  map(int,input().split())
if h == 1 or w == 1:
    print(1)
    exit()
else:
    print((h * w + 1) // 2)

Solution (Python):
from math import floor,ceil
h,w=map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    m =ceil(w/2) * ceil(h/2) + floor(w/2) * floor(h/2)
    print(m)

Solution (Python):
arg = input().split(' ')
H = int(arg[0])
W = int(arg[1])

if H == 1 or W == 1:
    print(1)
    exit(0)

w_odd = (W+1) // 2
w_even = W // 2

h_odd_line = (H+1) // 2
h_even_line = H // 2

reachable = w_odd * h_odd_line + w_even * h_even_line
print(reachable)

Solution (Python):
h, w = map(int, input().split())
if h > 1 and w > 1:
  print((h // 2) * (w // 2) + (h // 2 + h % 2) * (w // 2 + w % 2))
else:
  print(1)

Solution (Python):
def main():
    a, b= map(int, input().split())
    if a == 1 or b == 1:
        print('1')
    else:
        if (a*b)%2 == 0:
            print(round((a*b)/2))
        else:
            print(round(((a//2)+(a%2))*b)-(b//2))

main()

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    H,W = map(int, input().split())
    if (H==1) or (W==1):
        print(1)
        quit()
        
    i = H*W
    if i%2==0:
        print(i//2)
    else:
        print(i//2+1)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
import math

H, W = map(int, input().split(' '))
ans = (H * W) // 2
if H % 2 == 1 and W % 2 == 1:
    ans += 1
if H == 1 or W == 1:
    ans = 1
print(ans)

Solution (Python):
h,w=map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  if (h*w)%2==1:
    print(int(int(h*w//2)+1))
  else:
    print(int(h*w/2))

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

Solution (Python):

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

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

Solution (Python):
H, W = [int(i) for i in input().split()]
v = H * W
if H == 1 or W == 1:
    ans = 1
elif v % 2 == 0:
    ans = v // 2
else:
    ans = v // 2 + 1


print(ans)

Solution (Python):
n,m=map(int,input().split())
if n==1 or m==1:print(1);exit()
print(n*(m//2)+((n+1)//2)*(m%2))

Solution (Python):
H, W = map(int, input().split())


if H == 1 or W == 1:
    print(1)
    exit()

if H % 2 == 0:
    ans = (H / 2) * W
else:
    ans = (H // 2) * W + W // 2
    if W % 2 != 0:
        ans += 1

print(int(ans))

Solution (Python):
h, w = map(int, input().split())
a=0
if h==1 or w==1:
    a=1
elif h%2==1 and w%2==1:
    a=int(h*w/2)+1
else:
    a=int(h*w/2)

print(a)

Solution (Python):
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(1)
    exit()

ans = (h * w) // 2
if h * w % 2 == 0:
    print(ans)
else:
    print(ans + 1)

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



H,W = LI()

if W == 1 or H == 1:
    print(1)
    exit()
else:
    x = ((W+1)//2)*((H+1)//2)
    y = (W//2)*(H//2)
    print(x+y)

Solution (Python):
n,m=map(int,input().split())
if n==1 or m==1:print(1);exit()
print(n*(m//2)+((n+1)//2)*(m%2))

Solution (Python):
import math
a = list(map(int,input().split()))

m = 0
h = a[0]
w = a[1]

'''
for hi in range(h):
    for wi in range(w):
        if (hi+1 + wi+1) % 2 == 0:
            m += 1
'''
if h == 1 or w == 1:
    print(1)
else:
    m = math.ceil(w/2) * math.ceil(h/2) + math.floor(w/2) * math.floor(h/2)
    print(m)

Solution (Python):
a, b= map(int, input().split())
if a == 1:
    print('1')
elif b == 1:
    print('1')
else:
    if (a*b)%2 == 0:
        print(round((a*b)/2))
    else:
        print(round(((a//2)+(a%2))*b)-(b//2))

Solution (Python):
H,W = map(int,input().split())
if H == 1 or W == 1:
    print(1)
elif H % 2 == 0:
    print(H*W //2)
else:
    print((H-1)*W //2 + (W//2 + W%2))

Solution (Python):
h,w=map(int,input().split())
print((w//2*(h//2)+-w//2*(-h//2))*(h>1<w)or 1)

Solution (Python):
import math
if __name__ == '__main__':
    h, w = map(int, input().split())
    a = 1 if h == 1 or w == 1 else h * w // 2 if h * w % 2 == 0 else h * w // 2 + 1
    print(a)

Solution (Python):

from math import ceil
def main():
    h, w = map(int, input().split())
    if (h == 1) or (w == 1):
        print(1)
        return

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

Solution (Python):
h,w = map(int, input().split())

if h ==1 or w==1:
    print(1)
elif h%2 == 1 and w%2==1:
    print(((h+1)//2)*w-w//2)
elif h%2 ==0:
    print((h//2) * w)
else:
    print((w//2) * h)

Solution (Python):
H, W = map(int, input().split())
if H == 1 or W == 1:
    print(1)
elif H%2 == 0 or W%2 == 0:
    print(H*W//2)
else:
    print((H*W+1)//2)

Solution (Python):

import math
H,W= map(int, input().split())
if H == 1 or W == 1:
  print(1)
else:
  print(int(math.ceil(H/2) * math.ceil(W/2) + math.floor(H/2)*math.floor(W/2)))

Solution (Python):
H, W = map(int, input().split())

if H == 1 or W == 1:
    ans = 1
else:
    ans = (H * W + 1) // 2

print(ans)

Solution (Python):
def main():
    h, w = map(int, input().split())

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


if __name__ == '__main__':
    main()

Solution (Python):
H,W = list(map(int,input().split()))
 
if H==1 or W==1:
  print(1)
  exit()
 
if (H*W)%2==0:
  ans = H*W//2
else:
  ans = H*W//2 + 1
  
print(ans)

Solution (Python):
h, w = map(int, input().split())
if h == 1 or w == 1:
  print(1)
else:
  if h*w%2 != 0:
    print(h*w//2 + 1)
  else:
    print(h*w//2)

Solution (Python):
h, w = 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)

Solution (Python):
H , W = map(int, input().split())
S = H * W
s = S//2

if H == 1 or W ==1:
    print("1")
elif S % 2 == 0:
    print(s)
else:
    print(s+1)

Solution (Python):
from math import ceil
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(1)
else:
    print(ceil(h/2)*ceil(w/2) + int(h/2)*int(w/2))

Solution (Python):
from math import ceil
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(1)
else:
	print(ceil(h/2)*ceil(w/2) + int(h/2)*int(w/2))

Solution (Python):
h,w=map(int,input().split())
if h==1 or w==1:
  ans=1
else:
  ans=(h*w)//2
  if h*w%2==1:
    ans+=1
print(ans)

Solution (Python):
h,w = map(int,input().split())

if h ==1 or w == 1:
    print(1)
    exit()


if (h%2 == 0 and w%2 ==0) or (h%2 != 0 and w%2 == 0):
    ans = int(w/2) * h


elif h%2 != 0 and w%2 !=0:
    f = int(w/2) + 1
    s = f-1
    ans = f * (int(h/2)+1) + s * int(h/2)


elif h%2 == 0 and w%2 != 0:
    f = int(w/2) + 1
    s = int(w/2)
    ans = f * int(h/2) + s * int(h/2)

print(ans)

Solution (Python):
h,w = map(int,input().split())
if min(h,w) == 1:
	print(1)
else:
	print(h*w-(h*w//2))

Solution (Python):
h,w = map(int,input().split())
if h ==1 or w==1:
	print("1")
else:
  	print((h*w+1)//2)

Solution (Python):
import math
h,w = map(float,input().split())
if(min(h,w)==1):
    print(1)
    exit()
print(math.ceil(h*w/2.0))

Solution (Python):
a,b=map(int,input().split())
if a==1 or b == 1:
  print(1)
else:
  print((a*b+1)//2)

Solution (Python):
import math
a=list(map(int,input().split()))
if 1 in a:
  print(1)
else:
  print(math.ceil(a[0]*a[1]/2))

Solution (Python):
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(1)
elif h % 2 == 0:
    print(int(h*0.5*w))
else:
    if w % 2 == 0:
        c = h * int(w * 0.5)
    else:
        c = 0.5 * (int(h * w) + 1)
    print(int(c))

Solution (Python):
if __name__ == '__main__':
    input_line = 1
    for i in range(input_line):
        s = input().rstrip().split(' ')
        H = int(s[0])
        W = int(s[1])
        print(1 if H==1 or W==1 else int(H*W/2) if (H%2==0 or W%2 == 0) else int(H*W/2)+1)

Solution (Python):
H,W = map(int,input().split())
if H==1 or W==1:
  print(1)
else:
  if (H*W)%2==1:
    res = H*W//2+1
  else:
    res = H*W//2
  print(res)

Solution (Python):
h, w = map(int, input().split())

if h == 1 or w == 1:
  print(1)
else:
  z = h*w
  if z%2 == 0:
    print(z//2)
  else:
    print((z+1)//2)

Solution (Python):
tate,yoko=map(int,input().split())
masu=0
h=int(tate/2)
if yoko%2==1:
  gyou=int(yoko/2)+1
  if tate%2==1:
    masu=(2*gyou*h+gyou-h)
  else:
    masu=(2*gyou-1)*h
else:
  gyou=int(yoko/2)
  masu=(gyou*tate)

if yoko==1 or tate==1:
  print(1)  
else:
  print(masu)

Solution (Python):
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(1)
elif (h*w) % 2 == 0:
    print(int(h*w/2))
else:
    print(int(h*w/2)+1)

Solution (Python):
import math


n= list(map(int, input().split()))

if n[0] == 1 or n[1] == 1:
  print('1')
  
else:
  print(math.floor((n[0] * n[1] + 1)/ 2))

Solution (Python):
tate,yoko=map(int,input().split())
masu=0
h=int(tate/2)
if yoko%2==1:
  gyou=int(yoko/2)+1
  if tate%2==1:
    masu=(2*gyou*h+gyou-h)
  else:
    masu=(2*gyou-1)*h
else:
  gyou=int(yoko/2)
  masu=(gyou*tate)

if yoko==1 or tate==1:
  print(1)  
else:
  print(masu)

Solution (Python):
h,w = map(int,input().split())
if h == 1 or w == 1:
    print(1)
elif h*w % 2 == 0:
    print(h*w//2)
else:
    print((h*w+1)//2)

Solution (Python):
tate,yoko=map(int,input().split())
masu=0
h=int(tate/2)
if yoko%2==1:
  gyou=int(yoko/2)+1
  if tate%2==1:
    masu=(2*gyou*h+gyou-h)
  else:
    masu=(2*gyou-1)*h
else:
  gyou=int(yoko/2)
  masu=(gyou*tate)

if yoko==1 or tate==1:
  print(1)  
else:
  print(masu)

Solution (Python):
import math
H, W = map(int, input().split())
if H==1 or W == 1:
  print("1")
else:
	print(math.ceil(H/2)*math.ceil(W/2) + math.floor(H/2)*math.floor(W/2))

Solution (Python):
from decimal import Decimal

H, W = map(int, input().split())

if 1 in {H, W}:
    print(1)
else:
    a = Decimal(H * W + 1)
    print(a // Decimal(2))

Solution (Python):
H,W=map(int,input().split())
if min(H,W)==1:
  print(1)
else:
  print((H*W+1)//2)

Solution (Python):
H, W = map(int, input().split())

if H == 1 or W == 1:
  print(1)

elif W % 2 == 0:
  print(int(W/2*H))

else:
  x1 = W//2 + 1
  x2 = W//2
  if H % 2 == 0:
    result = int((x1+x2)*H/2)
    print(int(result))
  
  else:
    result = int((x1+x2)*(H//2) + x1)
    print(int(result))

Solution (Python):
H,W=map(int, input().split())
number=H*W
if H==1 or W==1:
    number=1
elif number%2==1:
    number=int(number/2)+1
else:
    number=int(number/2)

print(number)

Solution (Python):
import math

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

Solution (Python):
h,w=[int(i) for i in input().split()]
a=(h+1)//2
b=h//2

k=a*((w+1)//2)+b*(w//2)
if h==1 or w==1:
    k=1
print(k)

Solution (Python):


import math

H, W = map(int, input().split())




if H == 1 or W == 1:
    print(1)
elif H % 2 == 1 and W % 2 == 1:
    print(math.ceil(H * W / 2))
else:
    print(int(H * W / 2))

Solution (Python):
import sys
import math
args = sys.stdin.readline().split()
row = int(args[0])
column = int(args[1])

result = 0

if row == 1 or column == 1 :
    result = 1
else:
    result = math.ceil((row * column) / 2)

print(result)

Solution (Python):


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



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

Solution (Python):
h, w = map(int, input().split())
ans = (h * w + 1) // 2
if h == 1 or w == 1:
    ans = 1
print(ans)

Solution (Python):
h,w = map(int,input().split())
print((int(h/2+0.5)*w-(h%2)*int(w/2))if(h-1)and(w-1)else 1)

Solution (Python):
h, w = [int(x) for x in input().split()]

if h==1:
  print(1)
  quit()
if w==1:
  print(1)
  quit()

if h%2==0 and w%2==0:
  print(h*w//2)
elif h%2==0 and w%2==1:
  print(h*w//2)

elif h%2==1 and w%2==0:
  print((h*w)//2)
else:
  print((h*w)//2+1)

Solution (Python):
H, W = map(int, input().split())
if H == 1 or W == 1:
    ans = 1
elif H % 2 == 0:
    if W % 2 == 0:
        ans = H*(W//2)
    else:
        ans = H*((W-1)//2)+(H//2)
elif H % 2 == 1:
    if W % 2 == 0:
        ans = H*(W//2)
    else:  
        ans = H*((W-1)//2)+((H+1)//2)
print(ans)

Solution (Python):
h, w = map(int, input().split(' '))
print("1" if (h == 1)or(w == 1) else ((h * w) // 2) +
      1 if (h * w) % 2 == 1 else (h * w) // 2)

Solution (Python):
import math
a,b = map(int, input().split())
if a==1 or b == 1:
  print(1)
else:
  print(math.floor((a*b+1)/2))

Solution (Python):
from math import floor

N = [int(_) for _ in input().split()]

H, W = N[0], N[1]


def solve(H, W):
    acnt = floor(W / 2) + 1
    bcnt = W - acnt
    
    if H == 1 or W == 1:
        return 1
    else:
        return floor((H * W + 1) / 2)
    
    
    
    
    
    

print(solve(H, W))

Solution (Python):
import math

H, W = map(int,input().split())

if H==1 or W==1:
    print(1)
elif W%2 == 0:
    print(int((W/2)*H))
else:
    if H%2 == 0:
        print(int(W*(H/2)))
    else:
        print(int((W*H+1)/2))

Solution (Python):
H, W = [int(i) for i in input().split()]

if H == 1 or W == 1:
    print(1)
elif W % 2 == 0:
    print((H * W) // 2)
else :
    odd_row = (W // 2) + 1
    even_row = W // 2
    if H % 2 == 1:
        odd_row_num = (H // 2) + 1
        even_row_num = H // 2
        print((odd_row*odd_row_num) + (even_row*even_row_num))
    else :
        print((odd_row+even_row) * (H // 2))

Solution (Python):
h, w = map(int, input().split())
boad = h * w
if w == 1 or h == 1:
  print(1)
else:
  print((boad + 1) // 2)

Solution (Python):
H,W = map(int,input().split())

if H==1 or W==1:
  print(1)
else:
  print(int((H * W + 1) / 2))

Solution (Python):
def main():
    h,w = map(int,input().split())
    if h == 1 or w == 1:
      print(1)
      exit()
    if w%2==0:
        ans = h*w//2
    else:
        if h%2 == 0:
            ans = h*w//2
        else:
            ans = (h-1)*w//2+(w//2+1)
    print(ans)
    
if __name__ == "__main__":
    main()

Solution (Python):
H, W = map(int, input().split())

x = int(H/2)  
y = H%2  

z = int(W*x)  

num = z + int((W+1)/2)*y   

"""""""""
print('x: ' + str(x))
print('y: ' + str(y))
print('z: ' + str(z))
print('num: ' + str(num))

print()



"""""
if H == 1 or W == 1:
    print(1)
else:
    print(int(num))

Solution (Python):
h, w = map(int, input().split())

a = h * w

if h == 1 or w == 1:
    print(1)
    exit()

print((a + 1) //2)

Solution (Python):
import sys

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

if h == 1 or w == 1:
	print(1)
	sys.exit()

if w % 2 == 0:
	cx0 = int(w/2)
	cx1 = cx0
else:
	cx0 = int(w/2) + 1
	cx1 = int(w/2)

if h % 2 == 0:
	print(int(h / 2) * (cx0 + cx1))
else:
	print(int(h / 2) * (cx0 + cx1) + cx0)

Solution (Python):
h,w = (int(x) for x in input().split())

if h==1 or w==1:
    print(1)
elif (h*w)%2==0:
    print(h*w//2)
else:
    print((h*w//2)+1)

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

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols
    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])
    return ret


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_map_as_int(H):
    '''
    
    '''
    ret = []
    for _ in range(H):
        ret.append([1 if s == '
        
        
    return ret



from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from fractions import gcd


def lcm(a, b):
    
    g = gcd(a, b)
    return a * b // g


H, W = read_ints()

if H == 1 or W == 1:
    print(1)
    exit()


print((H * (W // 2)) + (W % 2) * ((H + 1) // 2))

Solution (Python):
H,W = map(int, input().split())


h = 0
w = 0
w1 = w2 = 0

if H == 1 or W ==1:
    print(1)
elif W % 2 == 1:
    w = int(W /2) + 1
    if H % 2 == 1:
        h = int(H / 2) + 1
        w1 = h * w
        w2 = (w-1) * (h-1)
        print(w1 + w2)
    else:
        h = int(H / 2)
        w1 = w * h
        w2 = (w-1) * h
        print(w1 + w2)
else:
    w = int(W / 2)
    print(w * H)

Solution (Python):
h , w = map(int, input().split())


if h == 1 or w ==1:
	print(1)
	exit()
elif w % 2 == 0:
	print(h * w // 2)
	exit()
elif w % 2 == 1:
	if h % 2 == 0:
		print(h * w // 2)
		exit()
	elif h % 2 == 1:
		print((h * w // 2) + 1)
		exit()

Solution (Python):
from math import ceil
H , W = map(int, input().split())
if H == 1 or W == 1:
  print(1)
else:
  print(ceil(H*W/2))

Solution (Python):
H, W=map(int, input().split())
if H==1 or W==1:
    print(1)
else:
    print((H*W+1)//2)

Solution (Python):

a,b = map(int, input().split())

if a == 1 or b == 1:
    print(1)
elif (a * b)%2 == 0:
    print(int((a * b)/2))
else:
     print((a*b)//2 + 1)

Solution (Python):
H,W=map(int,input().split())
if H==1:
  ans=1
elif W==1:
  ans=1
else:
  ans=(H*W+1)//2
print(ans)