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):
import math
h,w=map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  print(math.ceil(h*w/2))

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

ans = 0
x = H * W

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

print(ans)

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

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

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

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

Solution (Python):
h,w=input().split(" ")
h,w=int(h),int(w)
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):
H, W = list(map(int, input().split()))

seki = H * W

if H == 1 or W == 1:
    print(1)
else:
    ans = (seki + 2 - 1) // 2
    print(ans)

Solution (Python):

import sys
H,W = map(int,input().split())
k = H*W

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

if k%2 == 0:
    print(int(k/2))
else:
    print(int(k/2)+1)

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

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

if a==1 or b==1:
	print(1)
else:
	print(math.ceil(a*b/2))

Solution (Python):
import math

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

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

Solution (Python):
import math

def main():

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

if __name__ == "__main__":
    main()

Solution (Python):
import sys
H, W = list(map(int, input().split()))
if H == 1 or W == 1:
    print('1')
    sys.exit()
a = (W + 1) // 2
res = W * (H // 2) + (H % 2) * a
print(res)

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

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

a = H * W

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

if a%2==0:
    print(a//2)
else:
    print(a//2+1)

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

out = 0
if min(h, w) == 1:
    out = 1
else:
    out += (h // 2) * 2 * (w // 2) * 2 / 2 + (h % 2) * math.ceil(w / 2) + (w % 2) * math.ceil(h / 2) - (h % 2) * (w % 2)
print(int(out))

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

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

Solution (Python):
def resolve():
    '''
    code here
    '''
    H, W = [int(item) for item in input().split()]

    if H == 1 or W == 1:
        res = 1
    elif H % 2 == 1 and W % 2 == 1:
        res = H * W // 2 +1
    else:
        res = H * W // 2

    print(res)
if __name__ == "__main__":
    resolve()

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:
  if (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)
else:
    ans = H*W
    if ans % 2:
        print(ans//2+1)
    else:
        print(ans//2)

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

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

Solution (Python):

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

Solution (Python):
import math

H,W = list(map(int,input().split(" ")))
if W > 1 and H > 1:
    print(math.ceil((H*W)/2))
else:
    print(1)

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 sys

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

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

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

Solution (Python):









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

Solution (Python):
import sys

H, W = map(int, input().split())
if H == 1 or W == 1:
    print(1)
    sys.exit()

a = H * W
if a % 2 == 0:
    answer = a // 2
else:
    answer = a // 2 + 1
print(answer)

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

odd = ceil(h/2) * ceil(w/2)
even = int(h/2) * int(w/2)
if h==1 or w==1:
    print(1)
else:
    print(odd + even)

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

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

if H*W%2==0:
    print(int(H*W/2))
else:
    print(int(((H*W)+1)/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()]
if h == 1 or w == 1:
    print(1)
elif h % 2 == 1 and w % 2 == 1:
    print(int(h*w/2) + 1)
else:
    print(int(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):
h, w = map(int, open(0).read().split())

if h == 1 or w == 1:
    print(1)
else:
    print(sum(divmod(h*w, 2)))

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    h, w = mi()
    if h == 1 or w == 1:
        print(1)
    else:
        if h % 2 == 0 or w % 2 == 0:
            print(h * w // 2)        
        else:
            print(h * (w - 1) // 2 + (h + 1) // 2)


if __name__ == "__main__":
    main()

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

Solution (Python):
import math

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

Solution (Python):
import math

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

if H == 1 or W == 1:
    print(1)
else:
    result = math.ceil(H * W / 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())
if h==1 or w ==1:
  print(1)
  exit()
ans = h * w
if ans %2 == 0:
  print(ans // 2)
else:
  print(ans // 2 + 1)

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

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

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

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

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

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)
    else:
        print(H * W // 2 + 1)

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

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

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

if H == 1 or W == 1:
    Ans=1
else:
    if H*W%2 == 0:
        Ans=H*W/2
    else:
        Ans=H*W//2+1

print(round(Ans))

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

A=[0,math.ceil(W/2)]
if (H-1)*(W-1)!=0:
  c=W*math.floor(H/2)+A[H%2]
else:
  c=1
print(c)

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

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

print(ans)

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

def main(h,w):
    if (h==1 or w==1):
        return 1
    if w%2==0:
        yoko1=w//2
        yoko2=yoko1
    else:
        yoko1=w//2+1
        yoko2=yoko1-1
    if h%2==0:
        tate=h//2
        return (yoko1+yoko2)*tate
    else:
        tate=h//2
        return (yoko1+yoko2)*tate+yoko1

if __name__=='__main__':
    h,w=readinput()
    ans=main(h,w)
    print(ans)

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

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

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

Solution (Python):
import math

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

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

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)//2+1)

Solution (Python):
def resolve():
    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)*(W-1)//2+(H-1)//2+(W-1)//2+1)
    elif H%2 == 1 and W%2 == 0:
        print((H-1)*W//2+W//2)
    elif H%2 == 0 and W%2 == 1:
        print(H*(W-1)//2+H//2)
    else:
        print(H*W//2)
resolve()

Solution (Python):
from sys import stdin
H,W = [int(x) for x in stdin.readline().rstrip().split()]



n_odd = (1+W)//2

n_even = W//2

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


if H%2 == 0:
  ans = int((n_odd + n_even) * (H/2))
else:
  ans = int((n_odd + n_even) * (H-1)/2 + n_odd)

print(ans)

Solution (Python):
import math

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

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

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

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

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

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

ans=h*(w//2)

if w%2==1:
  ans+=(h+2-1)//2


print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

from math import ceil
H, W = mapint()
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)
    exit()

if H %2 == 0:
    tate = H/2
    ans = tate * W

else:
    tate1 = H // 2 + 1
    tate2 = H // 2
    if W % 2 == 0:
        ans = (tate1 + tate2) * W/2
    else:
        ans = tate1*((W//2)+1) + tate2*(W//2)
print(int(ans))

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

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

print(w*(h//2) if h%2==0 else w*(h//2)+a)

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

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

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

if H == 1 or W == 1:
  print(1)
  exit(0)
  
if (H * W) % 2 == 1:
  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()
print(((h+1)//2)*((w+1)//2)+(h//2)*(w//2))

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

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

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


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

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)
    else:
        print((h*w+1)//2)

Solution (Python):


import math
from decimal import *

def main():
    h,w = map(int, input().split())
    if h == 1:
        print(1)
        exit()
    elif w ==1:
        print(1)
        exit()
    else:
        print(math.ceil(h*w/2))

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

H, W = ri_()
if H == 1 or W == 1:
    print(1)
else:
    print(-(-H * W // 2))

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):
def main(H, W):
    if H == 1 or W == 1:
        return 1
    return -(-H * W // 2)


if __name__ == "__main__":
    H, W = map(int, input().split())
    ans = main(H, W)
    print(ans)

Solution (Python):
def main(H, W):
    if H == 1 or W == 1:
        return 1
    od = -(-W // 2)
    ev = W // 2
    ans = (od + ev) * (H // 2)
    if H % 2 == 1:
        ans += od
    return ans


if __name__ == "__main__":
    H, W = map(int, input().split())
    ans = main(H, W)
    print(ans)

Solution (Python):
x,y = list(map(float, input().split()))

ansew = x * y

if x == 1 or y == 1:
    print(1)
elif ansew % 2 == 0:
    print(int(ansew / 2))
else:
    print(int(ansew / 2 + 1))

Solution (Python):
def main():
    H,W = map(int,input().split())
    N = H*W
    

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

    return ans

print(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*w+1)//2)
else:
  print((h*w)//2)

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

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

Solution (Python):
import math
h,w = map(int,input().split())
w1 = int(w/2)
h1 = int(h/2)
w2 = int(w/2)
h2 = int(h/2)
if ( w % 2 != 0 ):
  w1 += 1
if ( h % 2 != 0 ):
  h1 += 1
res = h1 * w1 + h2 * w2
if (h == 1 or w == 1):
  print(1)
else:
  print(res)

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)
    else:
        print(H*W//2+1)

Solution (Python):
[H,W] = list(map(int,input().split(' ')))
K = int((H*W+1)*0.5)
if H==1 or W==1:print(1)
else:print(K)

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

Solution (Python):




from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""













if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip



"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""




def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod
 
    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)
 
def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): 
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def ceil(n, k=1): return n // k + (n % k != 0) 
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) 
def mi(): return map(int, input().split()) 
def li(): return list(map(int, input().split())) 
def lw(): return input().split() 
def lcm(a, b): return abs(a * b) // gcd(a, b) 
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) 
def dd(): return defaultdict(int) 
def ddl(): return defaultdict(list) 
def write(s): return sys.stdout.write(s)













def main():
    
    h,w=mi()
    if h==1 or w==1:
        print(1)
    else:
        if h*w %2==0:
            print(h*w//2)
        else:
            print((h*w + 1)//2)















































""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""
 
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange
 
import os, sys
from io import IOBase, BytesIO
 
BUFSIZE = 8192
 
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
 
class IOWrapper(IOBase):
 
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')


 
""" main function"""
 
if __name__ == '__main__':
    main()

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

Solution (Python):
def resolve():
    H, W = [int(i) for i in input().split()]
    if min(H, W) == 1:
        print(1)
    elif (H * W) % 2 == 0:
        print(format(H * W // 2, "d"))
    else:
        print(format((H * W // 2) + 1, "d"))


resolve()

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

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

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

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

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

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

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

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

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


ans = (H // 2) * (W // 2) + (-(-H // 2)) * (-(-W // 2))

if H == 1 or W == 1:
    ans = 1

print(ans)

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

h = H // 2
w = W // 2

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

if W % 2 == 1:
    w += 1
if H % 2 == 1:
    print(h * W + w)
else:
    print(h * W)

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

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

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

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

import sys
N=1
if W==1 or H==1:
    print(1)
    sys.exit()
if (W-1)%2==0:
    N+=(W-1)//2
    N+=(W-1)//2
elif (W-1)%2==1:
    N+=(W-2)//2
    N+=W//2
if H%2==0:
    NN=N*(H//2)
elif H%2==1:
    if (W-1)%2==0:
        NN=N*((H-1)//2)+(W-1)//2+1
    elif (W-1)%2==1:
        NN=N*((H-1)//2)+(W-2)//2+1
print(NN)

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

Solution (Python):
import math
tate,yoko = map(int,input().split())
if tate == 1 or yoko == 1:
    print(1)
else:
    if yoko%2 == 0:
        print(int((tate*yoko/2)))
    else:
        print(int((tate*(yoko-1)/2 + math.ceil(tate/2))))

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

if h == 1 or w == 1:
  print(1)
else:
  print(ans)

Solution (Python):



import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline




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

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

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

if 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()
w-=1
even=int(w/2)+1
odd=int((w+1)/2)
if h%2==0:
  print( (even+odd)*h//2 )
else:
  print( (even+odd)*(h-1)//2 + even )

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

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

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

import math

if H==1 or W==1:
  print(1)
else:
  print(math.ceil((H*W)/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*W/2)))

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

Solution (Python):
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    h,w = map(int, input().split())
    n = h*w
    if h == 1 or w ==1:
        print(1)
    elif n%2 == 0:
        print(n//2)
    else:
        print(n//2+1)


if __name__ == '__main__':
    main()

Solution (Python):
H,W = map(int,input().split())
if H == 1 or W == 1:
  print(1) 
else:
  if 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)
    exit()

if (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)
elif H%2==1 and W%2==1:
    print(int(((H+1)/2)*W-int(W/2)))
else:
    print(int(H*W/2))

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

if h==1 or w==1:
    print(1)
else:
    q,r = divmod(h*w, 2)
    print(q+r)

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 = W * (H//2)
if H&1:
    ans += (W+1)//2

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)
elif H % 2 == 0:
    print(H * W // 2)
elif W % 2 == 0:
    print(W * H // 2)
else:
    print((H * W + 1) // 2)

Solution (Python):
h, w = map(int, input().split())
import math
if h == 1 or w == 1:
  print(1)
  
elif h%2 == 0 and w%2 == 0:
  print(h * w // 2)
  
elif h%2 == 0 or w%2 == 0:
  if h%2 == 0:
    we = w//2
    wo = math.ceil(w/2)
    print(we * h//2 + wo * h//2)
    
  else:
    he = h//2
    ho = math.ceil(h/2)
    print(ho * w//2 + he * w//2)

else:
  	
	we = w//2
	wo = math.ceil(w/2)
	he = h//2
	ho = math.ceil(h/2)
	print(ho * wo + he * we)

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

    odd = H - even

    if W % 2 == 1:
        ans += even * (W // 2 + 1)
    else:
        ans += even * (W // 2)

    ans += odd * (W // 2)

    print(ans)

    return
 
resolve()

Solution (Python):
def resolve():
    H, W = list(map(int, input().split()))
    if H == 1 or W == 1:
        print(1)
        return

    ans = int(H * W / 2)
    if ((H * W) % 2 == 1):
        ans += 1
    print(ans)
    return
 
resolve()

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):
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):
import math
H,M = map(int,input().split())
if H == 1 or M ==1 :
    print(1)
else :
    print(math.ceil((H*M)/2))

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//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((h*w+1)//2)

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

Solution (Python):
(a,b)=[int(x) for x in input().split()]
if a==1 or b==1:
  print(1)
else:
  print((a*b+1)//2)

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-1)*W//2+W//2+1)

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

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

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

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

Solution (Python):
(a,b)=[int(x) for x in input().split()]
if a==1 or b==1:
  print(1)
else:
  print((a*b+1)//2)

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

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

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

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