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

Solution (Python):
import math
 
l = [int(x) for x in input().split()]

if l[0] == 1 or l[1] == 1:
  print(1)
else:
  print(math.ceil((l[0]*l[1])/2))

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

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

Solution (Python):
HW = list(map(int,input().split()))
if all(x%2==1 for x in HW) and HW[0]>1 and HW[1]>1:
    print(int((HW[0]*HW[1]+1)/2))
elif HW[0] == 1 or HW[1] == 1:
    print(1)
else:
    print(int((HW[0]*HW[1])/2))

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

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

Solution (Python):
def main(h, w):
    ans = 0

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


if __name__ == "__main__":
    h, w = map(int, input().split())

    main(h, w)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
h,w=map(int,input().split())
print((h*w+1)//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)
else:
    hc = (w+1) // 2
    hc2 = w // 2
    d, m = divmod(h, 2)
    ans = d * (hc + hc2) + m * hc
    print(ans)

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 numpy as np


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

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

ans = 1


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

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

Solution (Python):
num = input().split(" ")
if "1" in num:
  print(1)
else:
	gu = int(num[1]) // 2
	ki = int(num[1]) - int(gu)
	gu2 = int(num[0]) // 2
	ki2 = int(num[0]) - int(gu2)
	print(gu * gu2 + ki * ki2)

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

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

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

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

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

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

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

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

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

print(bishop())

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

Solution (Python):

Height, Width = map(int,input().split())
masu = Height * Width 
if Height == 1 or Width == 1:
    print(1)
elif masu % 2 == 0:
    print(masu // 2)
else:
    print(masu // 2 + 1)

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

if (H!=1)and(W!=1):
    print(ceil((H*W)/2))
else:
    print("1")

Solution (Python):

from sys import stdin
from operator import itemgetter



h, w = [int(x) for x in stdin.readline().rstrip().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):
a, b = map(int, input().split())
s = a*b
if a ==1:
    m = 1
elif b == 1:
    m = 1
else:
    if s % 2 == 0:
        m = int(s/2)
    else:
        m = int(s/2)+1
print(m)

Solution (Python):
def main():

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

    total = H * W

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

    else:
        if total % 2 == 0:
            print(int(total/2))

        else:
            print(int((total+1)/2))

    return

if __name__ == '__main__':
    main()

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

Solution (Python):


from sys import stdin, stderr

def main():
   H, W = map(int, stdin.readline().split())

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

   print(res)

   return 0

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

Solution (Python):
h,w=(int(i) for i in input().split())
if(h==1):
  print(1)
elif(w==1):
  print(1)
else:
  if(h%2==0):
    print((h//2)*w)
  else:
    print( (((h//2)+1)*w)-(w//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(W * H // 2)
else:
  total = H * (W//2) + H//2 + 1
  print(total)

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=(int(x) for x in input().split())

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

Solution (Python):
a,b=list(map(int,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)*(w-1)==0:
  print(1)
else:
  print(-(-h*w//2))

Solution (Python):
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
h, w = [int(i) for i in input().split()]
if h == 1 or w == 1:
    print(1)
else:
    n = h*w/2
    print(Decimal(n).quantize(Decimal('0'), rounding=ROUND_HALF_UP))

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

Solution (Python):
a,b = list(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):
import math





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

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

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

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

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

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

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

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

Solution (Python):

HW = input().split(' ')
H = int(HW[0])
W = int(HW[1])
if H == 1 or W == 1:
    print(1)
elif H % 2 == 0 and W % 2 == 0:
    print(int((W / 2) * H))
elif H % 2 == 1 and W % 2 == 1:
    print(int(W * (H // 2) + W // 2 + 1))
elif H % 2 == 1 and W % 2 ==0:
    print(int((W / 2)* H))
else:
    print(int((H / 2)* W))

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

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

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


if w == 1 or h == 1 :
    print("1")
elif (h * w ) % 2 == 0:
    result = h * w /2
    result = math.ceil(result)
    print(str(result))
elif (h * w )% 2 != 0:
    result = ((h * w) // 2 )+ 1
    result = math.ceil(result)
    print(str(result))

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

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

odd = (w + 1)// 2
even = w // 2


odd_count = (h + 1) // 2
even_count = h // 2

print(odd * odd_count + even * even_count if h > 1 and w > 1 else 1)

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

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

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

Solution (Python):
import sys
H,W=map(int,input().split())
area=H*W
if H==1 or W==1:
  print("1")
  sys.exit()

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

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))
elif H * W % 2 != 0:
    print(int(H * W // 2 + 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):
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 = [int(i) for i in input().split()]
 
if h == 1 or w == 1:
  print(1)
else:
  print(h * w // 2 + 1 if h * w % 2 else h * w //2 )

Solution (Python):
H,W=map(int, input().split())
w1=W//2
h1=H//2
if W%2!=0:
    w2=W//2+1
else:
    w2=w1
        
if H%2!=0:
    h2=H//2+1
else:
    h2=h1
print(w1*h1+w2*h2 if (H!=1)&(W!=1) else 1)

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

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




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

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

Solution (Python):
import sys
 
input = sys.stdin.readline
H, W = list(map(int,input().split()))
 
if H==1 or W==1:
    print(1)
    exit(0)

ans =int((H*W+1) // 2)
print(ans)

Solution (Python):
var = [int(s) for s in input().split()]

ans = int(var[0]*var[1] / 2 +0.6)

if var[0]==1 or var[1]==1:
    ans = 1

print(ans)

Solution (Python):
import sys
 
input = sys.stdin.readline
H, W = list(map(int,input().split()))
 
if H==1 or W==1:
    print(1)
    exit(0)

ans =int((H*W+1) // 2)
print(ans)

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

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

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

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

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

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

print(a)

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

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

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

print(ans)

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

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

if h%2:
      H=h//2+1
      print(H*w-(w//2))
      exit()
else:
      H=h//2
      print(H*w)
      exit()

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

Solution (Python):
H,W = list(map(lambda x:int(x),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(int(ans))

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

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

HW = H * W
HW2 = HW // 2

if H == 1 or W == 1:
    ans = 1
else:
    if HW % 2 == 0:
        ans = HW2
    else:
        ans = HW2 + 1

print(ans)

Solution (Python):
import math as m

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

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

Solution (Python):
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]==1 or data[1]==1:
    print(1)
elif (data[0]*data[0])%2==0:
    print(str(round((data[0]*data[1])/2)))
else:
    print(str(round((data[0]*data[1]+1)/2)))

Solution (Python):
i = input().split()
h = int(i[0])
w = int(i[1])

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())
print(1 if h == 1 or w == 1 else (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 W==1 or H==1:
    print(1)
    exit()

temp=-(-H//2)

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

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

if H%2==0:
    Ha="even"
else:
    Ha="odd"

if W%2==0:
    Wa="even"
else:
    Wa="odd"

if H==1 or W==1:
    print(1)
elif Ha=="even"or Wa=="even":
    print(math.floor(H*W/2))
else:
    print(math.floor(H*W/2+0.5))

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

mode = 'odd'
if w%2 == 0:
    mode = 'even'
    
    
v = 0
if mode == 'odd':
    v1 = (w-1) // 2 + 1
    
    if h%2 == 0:
        v = (2*v1 -1) * (h//2)
    else:
        v = v1 + ((2*v1 -1) * (h//2))
else:
    v1 = w // 2
    v = v1 * h

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

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

Solution (Python):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]








h, w = map(int, input().split())
if (w == 1) or(h == 1):
    print(1)
    exit()

sum = 0

sum += (math.ceil(w/2))*(math.ceil(h/2))  
sum += (math.floor(w/2))*(math.floor(h/2))  

print(sum)

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

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

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

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

res = 0




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

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

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:
  print((h*w+1)//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):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]








h, w = map(int, input().split())
if (w == 1) or(h == 1):
    print(1)
    exit()

if h*w % 2 == 0:
    print(int((h*w)/2))
if h*w % 2 != 0:
    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):
import math
H, W = map(int, input().split())

if H == 1 or W == 1:
    print(1)
    exit()
if H % 2 == 0:
    can = H // 2
    ans = can * W
    print(ans)
elif H % 2 == 1:
    can = H
    ans = math.ceil(can * (W / 2))
    print(ans)

Solution (Python):
from math import ceil

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

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

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

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

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

if min(H, W) == 1:
  print(1)
  exit()

n = H * W
ans = (n + 1) / 2
print(math.floor(ans))

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

Solution (Python):
a,b=list(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))

Solution (Python):

import math

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


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

print(movable)

Solution (Python):
import sys

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

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

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

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

  
if(h*w % 2 == 0):
  print(int(h*w/2))
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:
  nos = math.ceil(w/2)*math.ceil(h/2) + math.floor(w/2)*math.floor(h/2)
  print(nos)

Solution (Python):
def bishop(H, W):
    if H==1 or W== 1:
        return 1
    result  = int((H-1)/2 + 1) * int((W-1)/2 + 1) + int(H/2) * int(W/2)
    return result
ans = input().split(" ")
H = int(ans[0])
W = int(ans[1])
print(bishop(H,W))

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


h=int(h)
w=int(w)

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

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

Solution (Python):
from math import floor, ceil


def solve():
    h, w = map(int, input().split())

    h1 = float(h/2)
    w1 = float(w/2)

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

    if (h % 2 and w % 2 is 0) or (h % 2 and w % 2 is not 0):
        tot = ceil(h1) * ceil(w1) + floor(h1) * floor(w1)
    else:
        if h % 2 is 0:
            tot = h1 * w
        elif w % 2 is 0:
            tot = w1 * h

    print(int(tot))


if __name__ == "__main__":
    solve()

Solution (Python):
from math import floor, ceil


def solve():
    h, w = map(int, input().split())

    h1 = float(h/2)
    w1 = float(w/2)

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

    if (h % 2 and w % 2 is 0) or (h % 2 and w % 2 is not 0):
        tot = ceil(h1) * ceil(w1) + floor(h1) * floor(w1)
    else:
        if h % 2 is 0:
            tot = h1 * w
        elif w % 2 is 0:
            tot = w1 * h

    print(int(tot))


if __name__ == "__main__":
    solve()

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

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

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

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

Solution (Python):
import math
r,c = input().split()
r = int(r)
c = int(c)
if(r==1 or c==1):
    print(1)
else:    
    ans = r*c/2
    if r%2==1 and c%2==1:
        print(math.floor(ans)+1)
    else:
        print(math.floor(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):

import math

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

if(H%2 == 0 and W%2 == 0):
    ans = int(W/2)*int(H/2)+int(W/2)*int(H/2)
elif(H%2 == 0 and W%2 == 1):
    ans = math.ceil(W/2)*int(H/2)+int(W/2)*int(H/2)
elif(H%2 == 1 and W%2 == 0):
    ans = int(W/2)*math.ceil(H/2)+int(W/2)*int(H/2)
elif(H%2 == 1 and W%2 == 1):
    ans = math.ceil(W/2)*math.ceil(H/2)+int(W/2)*int(H/2)

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

print(int(ans))

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())
masu=h*w
if h==1 or w==1:
  print(1)
elif masu%2==0:
  print(masu//2)
else:
  print((masu//2)+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):
a,b=map(int,input().split())
if a%2==1 and b%2==1 and a!=1 and b!=1:
  print(int(a*(b+1)/2-(a-1)/2))
elif a==1 or b==1:
  print(1)
else:
  print(int(a*b/2))

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

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

    if H % 2 == 0:
        print(H // 2 * W)
        return

    if W % 2 == 0:
        print(W // 2 * H)
        return

    odd = W // 2 + 1
    even = W // 2

    ans = odd * (H // 2 + 1) + even * (H // 2)
    print(ans)

main()

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

Solution (Python):
def solve(h, w):
    if min(h, w) == 1:
        return 1
    return (h*w+1) // 2

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

Solution (Python):



def main():
    from math import ceil
    import sys
    input = sys.stdin.readline

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

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

    ans = h // 2 * w

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

    print(ans)


if __name__ == '__main__':
    main()

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

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

q, r = divmod(H, 2)

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

Solution (Python):

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


m=h//2
n=w//2

if h==1 or w==1:
    ans=1
elif h%2==0:
    ans=m*w
else:
    md=w%2
    ans=n*(m+1+m)+md*(m+1)
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	H,W = MI()
	W1 = (W+1)//2
	W2 = W//2
	H1 = (H+1)//2
	H2 = H//2
	if(H==1 or W==1):
		print(1)
	else:
		print(H1*W1+H2*W2)

if __name__ == '__main__':
	main()

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

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