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

Solution (Python):
import sys
import math
input=sys.stdin.buffer.readline
h,w=map(int,input().split())
ans=math.ceil(h*w/2)
print(1 if min(h,w)==1 else ans)

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

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

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

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict

con = 10 ** 9 + 7

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


def main():
	H, W = getlist()
	if H == 1 or W == 1:
		print(1)
		return

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

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


if __name__ == '__main__':
	main()

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

if h == 1 or w ==1 :
  ans += 1

else:
    
    ans += math.ceil(h/2)*math.ceil(w/2)+(h//2)*(w//2)
 
print(ans)

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

Solution (Python):
x,y=list(map(int,raw_input().split()))
w=x
h=y
if x==1 or y==1:
  print("1")
  exit(0)
ans=x//2 * (h//2 + (h+1)//2)
if x%2==1:
     ans+=(h+1)//2
print(ans)

Solution (Python):
import math
data = input().split(' ')
h = int(data[0])
w = int(data[1])
if h == 1 or w == 1:
    print(1)
else:
    ans = math.ceil(h/2) * math.ceil(w/2) + math.floor(h/2) * math.floor(w/2)
    print(ans)

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

if h == 1 or w == 1:
    print(1)
else:
    print(math.ceil(a))

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

masu = h * w

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

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

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

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

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

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

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

Solution (Python):
from statistics import median


from itertools import combinations 
from collections import deque
from collections import defaultdict
from fractions import gcd
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    h,w = readInts()
    mul = h * w 
    if h == 1 or w == 1:
        print(1)
    elif mul % 2 == 0:
        print(mul // 2)
    else:
        print((mul+1)//2)
if __name__ == '__main__':
  main()

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())

all = H * W

if (H == 1) or (W == 1):
  print(1)
elif all % 2 == 1:
  print((all + 1)// 2)
else:
  print(all // 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):
from math import ceil
H, W = map(int, input().split())
if 1 in [H, W]:
    print(1)
else:
    print(ceil(H * W / 2))

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


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

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

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

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

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



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

main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import numpy as np
import sys

input = sys.stdin.readline

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):
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:
    ans = 1
elif (h * w) % 2 == 0:
    ans = h * w // 2
else:
    ans = (h * w + 1) // 2

print("{}".format(ans))

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

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

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

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

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

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

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

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,raw_input().split())
if h ==1 or w == 1:
    print 1

else:

    print (w*h+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 = map(int, input().split())

if H==1 or W==1:
  Answer =1

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

print(int(Answer))

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


c=0

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

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

Solution (Python):
H,W=map(int,input().split())
def ABC(a):
    if a%2==1:
        return (a//2)+1
    elif a%2==0:
        return a//2
if H>1 and W>1:
    ans=(H//2)*(W//2)+(ABC(H)*ABC(W))
    print(ans)
else:
    print(1)

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

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

Solution (Python):


import math

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

if h==1 or w==1:
    ans=1
elif h%2==0:
    ans=(int)(h/2*(math.ceil(w/2)+math.ceil((w-1)/2)))
else:
    ans=(int)((h-1)/2*(math.ceil(w/2)+math.ceil((w-1)/2))+math.ceil(w/2))

print(ans)

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

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

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

else:
    ans = H//2 * W

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

print(ans)

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

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

Solution (Python):


N, M = list(map(int, input().split()))
if N == 1 and M != 1:
    ans = 1
elif N != 1 and M == 1:
    ans = 1
else:
    a = ((N + 1) // 2) * ((M + 1) // 2)
    b = (N // 2) * (M // 2)
    ans = a + b
print(ans)

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

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

print(count)

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


if __name__ == "__main__":
    resolve()

Solution (Python):
import math

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

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

    if H % 2 == 0:
        print((o+e)*(H//2))
    else:
        print((o+e)*(H//2) + o)

Solution (Python):
M, N = map(int,input().split())

if M == 1 or N == 1:
  print(1)
elif M * N % 2 == 1:
    print(M * N // 2 + 1)
elif M*  N % 2 == 0:
    print(M * N // 2)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    h,w=map(int,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)

if __name__=='__main__':
    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(int((H*W+1)/2))
elif H ==0 or W == 0:
    print(0)
else:
    print(int((H*W)/2))

Solution (Python):
import math

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

if (h == 1 or w == 1):
    print(1)
    quit()
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):
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):
import math
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 = 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:
    answer = 1
else:
    answer = 0
    answer += (((H+1)//2)*((W+1)//2) + ((H//2)*(W//2)))

print(answer)

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())
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):
m, n = map(int, input().split())

ans = -1

mn = m*n

if m == 1 or n == 1:
    ans = 1
else:
    ans = int((m*n + 1)/2)
    
print(ans)

Solution (Python):
m, n = map(int, input().split())

ans = -1

mn = m*n

if m == 1 or n == 1:
    ans = 1
else:
    if mn%2 == 0:
        ans = int(mn/2)
    else:
        ans = int(mn/2) + 1
    
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:
    a = (h+1) // 2 
    b = (w+1) // 2 
    c = h // 2 
    d = w // 2 
    
    print(a*b+c*d)

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

if H == 1 or W == 1:
    print(1)
else:
    a = (H + 1) // 2
    b = (W + 1) // 2
    c = H // 2
    d = W // 2

    print(a * b + c * d)

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

if h ==1 or w == 1:
    print(1)
else:
    print(0 - -(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
field = [int(i) for i in input().split(" ")]
field_num = field[0] * field[1]
if field[0] == 1 or field[1] == 1:
    print(1)
else:
    canFillBlock = 0
    canFillBlock += math.ceil(field[1]/2) * math.ceil(field[0]/2)
    canFillBlock += math.floor(field[1]/2) * math.floor(field[0]/2)
    print(canFillBlock)

Solution (Python):

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

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

Solution (Python):
height,width = map(int,input().split())

if height%2==0:
  h1=height//2
  h2=height//2
else:
  h1 = height//2 +1
  h2 = height//2

if height==1 or width ==1:
  ans = 1
else:
  ans = (h1+h2)*(width//2) + h1*(width%2)
print(ans)

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

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

Solution (Python):
h, w = map(int, input().strip().split())
pattern1 = (w + 1) // 2
pattern2 = w // 2

ans = pattern1 * ((h + 1) // 2) + pattern2 * (h // 2)

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

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

Solution (Python):

import sys
input = sys.stdin.readline

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

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:
        x1 = H // 2
        x0 = H - x1
        y1 = W // 2
        y0 = W - y1
        print(x1*y1+x0*y0)

if __name__ == '__main__':
    main()

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

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

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 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")
else:
    print(a*b//2+a*b%2)

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

if H == 1 or W == 1:
    ans = 1
else:
    if H % 2 == 1 and W % 2 == 1:
        ans = H * (W // 2) + H // 2 + 1
    else:
        ans = W * H // 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())
ans = 0
def main(h,w):
    if h == 1 or w == 1:
        return 1
    if h*w % 2 == 0:
        ans = h*w // 2
        return ans
    else:
        ans = h*w // 2 + 1
        return ans 
print(main(h,w))

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

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


ho = H // 2 + H % 2
he = H // 2
wo = W - (W // 2)
we = W // 2
ans = ho * wo + he * we
if H == 1 or W == 1:
    print(1)
else:
    print(ans)

Solution (Python):
a, b = map(int, input().split())
if a == 1 or b == 1:
    print(1)
elif a*b%2:
    print((a*b+1)//2)
else:
    print((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
H,W=[int(s) for s in input().split(" ")]

if H==1 or W==1:
    print(min(H,W))
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)
elif h %2 == 0 or w %2 ==0:
    print(int(h*w//2))
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 == 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)
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 = 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:
  odd = ((W + 1) // 2) * ((H + 1) // 2)
  even = (W // 2) * (H // 2)
  print(odd + even)

Solution (Python):
a,b=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 or W == 1:
    print(1)
    exit()

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

Solution (Python):
def myAnswer(H:int,W:int) -> int:
   if(H == 1 or W == 1):
      return 1
   else:
      return (H * W) // 2 + (H * W) % 2


def modelAnswer():
   tmp=1
def main():
   H, W = map(int,input().split())
   print(myAnswer(H,W))

if __name__ == '__main__':
   main()

Solution (Python):
H, W = map(int, input().split())
if H == 1 or W == 1:
    print(1)
else:
    if W % 2 == 0:
        r = W // 2
        print(r * H)
    else:
        r1 = W // 2 + 1
        r2 = W // 2 
        c = 0
        for i in range(H):
            if i % 2 == 0:
                c += r1
            else:
                c += r2
        print(c)

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

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


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

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

if __name__ == '__main__':
	main()

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))

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(sum(divmod(H * W, 2)))

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

Solution (Python):
import math
H,W = (int(x) for x 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())
print(1 if H == 1 or W == 1 else (H*W+1)//2 )

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

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

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

count = 0
if y == 1 or x == 1:
	count = 1
elif y % 2 == 0:
	count = x * (y // 2)
else:
	count = x * ((y + 1) // 2) - (x // 2)

print(count)

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

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

ans = (math.ceil(W / 2) * math.ceil(H / 2)) + ((W // 2) * (H // 2))

print(ans)

Solution (Python):
from math import floor, ceil
v, h = list(map(int, input().split()))
if v == 1 or h == 1:
    print(1)
else:
    vc = ceil(v/2)
    vf = floor(v/2)
    hc = ceil(h/2)
    hf = floor(h/2)
    print(vc*hc+vf*hf)

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

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

Solution (Python):
tate, yoko = map(int, input().split())

if tate == 1:
	print(1)
elif yoko == 1:
	print(1)
elif (tate*yoko)%2==1:
	print(int((tate*yoko+1)/2))
else:
	print(int((tate*yoko)/2))

Solution (Python):

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

if (W == 1) | (H == 1):
    print(1)
else:
    if H % 2 == 1:
        h1 = H // 2 + 1
        h2 = H // 2
        if W % 2 == 1:
            print((h1+h2)*(W//2) + h1)
        else:
            print((h1+h2)*(W//2))
    else:
        print(H // 2 * W)

Solution (Python):
H,W = [int(i) for i in 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())
ans = (h*w)/2
if h==1 or w==1:print(1)
else:print(math.ceil(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):
from math import *
h, w = map(int, input('').split(' '))

if h > 1 and w > 1:
	print(ceil(w/2) * ceil(h/2) + floor(w/2) * floor(h/2) )
else:
  print(1)

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

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

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

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

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

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

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

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

board = h * w

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

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