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

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

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

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

Solution (Python):
import math

h, w = input().split()

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

if (h == 1) or (w == 1):
  print(1)
else:
  print(math.ceil(max([h, w]) / 2) * math.ceil(min([h, w]) / 2) + math.floor(max([h, w]) / 2) * math.floor(min([h, w]) / 2))

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

print(main())

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

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

Solution (Python):
import math

H, W = map(int, input().split())
if H == 1 or W == 1:
  print("1")
  exit()
result = 0
yoko_1 = 0
yoko_2 = 0

if W%2 == 0:
  yoko_1 = int(W/2)
  yoko_2 = int(W/2)
else:
  yoko_1 = int(math.floor(W/2+0.5))
  yoko_2 = int(math.floor(W/2-0.5))
  
tate_1 = 0
tate_2 = 0

if H%2 == 0:
  tate_1 = int(H/2)
  tate_2 = int(H/2)
else:
  tate_1 = int(math.floor(H/2+0.5))
  tate_2 = int(math.floor(H/2-0.5))

result = yoko_1 * tate_1 + yoko_2 * tate_2

print(int(result))

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

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

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

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

Solution (Python):
b = [int(i) for i in input().split()]
if b[0] == 1 or b[1] == 1:
    print(1)
elif b[0] * b[1] % 2 == 0:
    print(b[0] * b[1] // 2)
else:
    print(b[0] * b[1] // 2 + 1)

Solution (Python):
import math

HW = input().split()

H = int(HW[0])
W = int(HW[1])


result = int(0)

y1 = 0
y2 = 0
if W%2 == 1:
    y1 = int(W/2) + 1
    y2 = int(W/2)
else:
    y1 = int(W/2)
    y2 = y1


if H%2 == 1:
    result += y1 * (int(H/2) + 1)
    result += y2 * int(H/2)
else:
    result += y1 * int(H/2)
    result += y2 * int(H/2)

if H == 1 or W == 1:
    result = 1

print(result)

Solution (Python):
import numpy as np
h_w_list = [int(i) for i in input().split()]

if h_w_list[0] == 1 or h_w_list[1] ==1:
    print(1)

elif h_w_list[0]*h_w_list[1] % 2 == 0:    
    print(int(h_w_list[0]*h_w_list[1]/2))

else:
    print(int(np.ceil(h_w_list[0]*h_w_list[1]/2)))

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

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

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

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

r,c = map(int,input().split())

if r==1 or c==1:
  print("1")
else:
  total = m.ceil(c/2) * m.ceil(r/2) + m.floor(c/2)* m.floor(r/2)

  print(total)

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

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

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

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

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

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

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

is_odd_h = False
is_odd_w = False

if h % 2 == 0:
     pass
else:
     is_odd_h = True

if w % 2 == 0:
     pass
else:
     is_odd_w = True

if is_odd_h and is_odd_w:
    ans = math.ceil(h * w / 2)
else:
    ans = h * w / 2

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

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

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

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

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

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):
inp = list(map(int,input().split()))
 
a = inp[0]*inp[1]

if (inp[0]==1 or inp[1]==1):
    print("1")
else:
    if (a %2 == 1):
        b = int(a/2)+1
        print('{:.19g}'.format(b))
    else:
        b = a/2
        print('{:.19g}'.format(b))

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):
from math import sqrt
a,b=map(int,input().split())
if(a==1 or b==1):
    print('1')
    exit()
if(a%2==0):
    a//=2
    print(a*b)
elif(b%2==0):
    b//=2
    print(a*b)
else:
    print((a*b)//2+(a*b)%2)

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

Solution (Python):

import sys

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

ans = 0

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

HW = H * W

if HW % 2 == 0:
    ans = int(HW / 2)
else:
    ans = int(HW / 2) + 1

print(ans)

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

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

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

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

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

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



def main():
    H, W = MI()
    h = 0
    w = 0
    ans = 0

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

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

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    H,W=MI()
    if(1 in (H,W)):
        print(1)
        return
    print(ceil(H*W,2))
if __name__ == '__main__':
    main()

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007



def main():
	b , c = IN()
	if b==1 or c== 1:
		return 1
	e=((b+1)//2)
	o=b//2
	ret=0
	ret+=e*((c+1)//2)
	ret+=o*(c//2)
	print(ret)

	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

Solution (Python):
import math

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

count = math.ceil(h/2)



if (h == 1 or w == 1) or (h == 1 and w == 1):
    print(1)
else:
    if h % 2 == 0:
        print(count * w)
    else:
        
        a = math.floor(w/2)
        
        print((w - a) * count + (count - 1) * a)

Solution (Python):

import math


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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
h , w = map(int, input().split())
if h == 1 or w == 1: exit(print(1))
a1 = h//2 + 1 if h % 2 != 0 else h//2
a2 = h - a1
a3 = w//2 + 1 if w%2!=0 else w//2
a4 = w - a3

ans = a1*a3 + a2*a4
print(ans)

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

Solution (Python):

"""
Created on Sat Mar 14 21:11:42 2020

@author: Kanaru Sato
"""

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

print(int(ans))

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

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

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

H = int(i[0])
W = int(i[1])

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

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

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

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

Solution (Python):
import sys

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

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

y1 = 1 + (H-1) // 2
y2 = H // 2

print((W//2)*(y1+y2) + (W%2)*y1)

Solution (Python):
import sys
h,w=map(int,input().split())
if w==1:
  print(1)
  sys.exit()
if h==1:
  print(1)
  sys.exit()
if w%2==0:
  l=w//2
  print(l*h)
else:
  l=(w+1)//2
  m=(h+1)//2
  n=h-m
  print(l*m+(l-1)*n)

Solution (Python):
import bisect,collections,itertools,math,numpy,string
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return list(map(int,input().split()))

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

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

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

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

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

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

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

Solution (Python):
def main():
    h,w = map(int,input().split())
    
    
    gusuu_dan = h//2
    kisuu_dan = h - gusuu_dan

    gusuu_retsu = w//2
    kisuu_retsu = w - gusuu_retsu
    answer = kisuu_dan * kisuu_retsu + gusuu_dan * gusuu_retsu

    

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






if __name__ == '__main__':
    main()

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

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

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

cell = nums[0] * nums[1]

if nums[0] == 1 or nums[1] == 1:
  print(1)
elif cell % 2 == 0:
  print(int(cell / 2))
else:
  print(int(math.ceil(cell / 2)))

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

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

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

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

if H == 1 or W == 1: print 1
else:
    h, w = H + 1 >> 1, W + 1 >> 1
    hr, wr = H - h, W - w

    print h * w + hr * wr

Solution (Python):
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if height != 1 and width != 1:
	mass = math.ceil(area / 2)
	print(mass)
else:
	print(1)

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
from collections import deque, Counter
def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math
INF = 10 ** 20

def main():
    h,w = getList()
    if h == 1 or w == 1:
        print(1)
        return
    yoko1 = h // 2 + (h % 2)
    yoko2 = (h // 2)
    ans = (w // 2) * (yoko1 + yoko2)
    if w % 2 == 1:
        ans += yoko1

    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
import sys
import math
a = input().split()


H = int(a[0])
W = int(a[1])

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

c = H * W
if c % 2 == 1:
  c = math.floor(c / 2) + 1
else:
  c = math.floor(c / 2)

print(c)

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

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

if h == 1 or w == 1:
    c = 1
elif h & 1:
    if w & 1:
        c = ((h + 1) // 2) * ((w + 1) // 2) + (h // 2) * (w // 2)
    else:
        c = (((h + 1) // 2) + (h // 2)) * (w // 2)
else:
    c = (h // 2) * w

print(c)

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

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

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

x1 = ceil(W / 2)
x2 = W // 2

print(int(ceil(H / 2) * x1 + H // 2 * x2))

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians

from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    H, W = MAP()
    print(ceil(H*W/2) if H != 1 and W != 1 else 1)


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

even = math.ceil(W/2)
odd = math.floor(W/2)

cnt = 0

if H==1 or W==1:
    cnt = 1
else:
    if H%2:
        cnt = even*math.ceil(H/2) + odd*math.floor(H/2)
    else:
        cnt = even*math.floor(H/2) + odd*math.ceil(H/2)
    
print(cnt)

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

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

Solution (Python):

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

    ans = h * w // 2
    if (h % 2 == 1 and w % 2 == 1):

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

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

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

set_num = int(H/2)

number = int(set_num * W)

amari = H - int(set_num) * 2

number += amari * math.ceil(W/2)
print(int(number))

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

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

if W % 2 == 0:
    f, n = W // 2, W // 2
else:
    f = math.ceil(W / 2)
    n = f - 1

if H % 2 == 0:
    kakeru = H // 2
    print(f * kakeru + n * kakeru)
    exit()
else:
    kakeru = H // 2
    n_kakeru = H - kakeru
    print((f * n_kakeru) + (n * kakeru))
    exit()

Solution (Python):
string = input().split(' ')

H = int(string[0])
W = int(string[1])

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

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

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

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):
h,w=[int(e) for e in 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())
ans=0

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

print(ans)

Solution (Python):
h,w=map(int,input().split())
if h==1:
  print(1)
  exit()
if w==1:
  print(1)
  exit()
e=w//2
o=w-e
E=h//2
O=h-E
c=e*E+o*O
print(c)

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

def can_move(H, W):
    if W == 0:
        return 0
    elif H == 1 or W == 1:
        return 1
    masu = H * W
    return int((masu / 2) + (masu % 2))

print(can_move(H, W))

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

even_rows = h // 2
odd_rows = (h+1) // 2

if w > 1 and h > 1:
    ans = 0
    ans += w // 2 * even_rows
    ans += (w+1) // 2 * odd_rows

    print(ans)
else:
    print(1)

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10


def solve():
    h, w = LI()
    ans = 0
    if h == 1 or w == 1:
        print(1)
        return
    x = (h + 1) // 2
    y = h // 2
    ans += (w + 1) // 2 * x
    ans += w // 2 * y
    print(ans)
    return



if __name__ == '__main__':
    solve()

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

Solution (Python):
import sys

x = list( map(int, input().split()) )
h = x[0]
w = x[1]

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


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

Solution (Python):



hi, wd = map(int, input().split())



if hi==1 or wd ==1:
    print(1)
    exit()


if hi%2 == 0 or wd%2 == 0:
    print(hi*wd//2)
else:
    print(hi*wd//2 + 1)

Solution (Python):
H, W = map(int, input().split())
a = W // 2
b = W % 2

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