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

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

ans = h*w
if h == 1 or w == 1:
  print(1)
else:
  if ans%2 == 0:
    print(ans//2)
  else:
    print(ans//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):
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

h, w = LI()

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

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(0--H*W//2)

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

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

if total % 2:
    ans = (total + 1)//2

else:
    ans = total//2

print(ans)

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

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

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


import math

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

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

Solution (Python):

import sys
import math


def solve(H: int, W: int):
    if H == 1 or W == 1:
        print(1)
        return
    ans = math.ceil(H / 2) * math.ceil(W / 2) + (H // 2) * (W // 2)
    return print(ans)



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

if __name__ == '__main__':
    main()

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

Solution (Python):
x = list(map(int,input().split()))
H = x[0]
W = x[1]

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

Solution (Python):
import math
H, W = map(int, input().split())
A = math.ceil((H * W)/2)

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

Solution (Python):


def main():
    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)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
import sys
from itertools import islice, tee


def resolve(in_):
    H, W = map(int, next(in_).split())
    h0, h1 = divmod(H, 2)
    w0, w1 = divmod(W, 2)

    if H == 1 or W == 1:
        return 1

    answer = h0 * w0 * 2
    if h1:
        answer += w0
    if w1:
        answer += h0
    if h1 and w1:
        answer += 1

    return answer


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

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

h_odd = (h+1)//2
h_even = h//2
w_odd = (w+1)//2
w_even = w//2

if h == 1 or w ==1:
    print(1)
else:
    ans = h_odd * w_odd + h_even *w_even
    print(ans)

Solution (Python):

import sys
input=sys.stdin.readline

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

if __name__=="__main__":
    main()

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

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

Solution (Python):

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

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

Solution (Python):

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

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

print(can_reach)

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

Solution (Python):


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

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 = int(H*W/2)

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

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):
import math as m

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

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

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

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

elif H == 1 or W  == 1:
  s = 1


print(s)

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

Solution (Python):
def main():
    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)


if __name__ == "__main__":
    main()

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

Solution (Python):
import sys


def main():
    input = sys.stdin.buffer.readline
    h, w = map(int, input().split())
    print((h * w + 1) // 2 if min(h, w) > 1 else 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 // 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 = [int(x) for x in input().split()]

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

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

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

Solution (Python):
import math

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

h = x[0]
w = x[1]

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

'''
for i in range(h):
    if i % 2 == 0:
        count += math.ceil(w/2)
    else:
        count += math.floor(w/2)
'''

print(count)

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

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

Solution (Python):
"""Boot-camp-for-Beginners_Easy006_B_Bishop_25-August-2020.py"""

H, W = (map(int, 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 = list(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().strip().split())

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

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

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%2)==0:
  h = -(-H//2)
  print(h*W)
  sys.exit()
elif(W%2)==0:
  w = -(-W//2)
  print(H*w)
  sys.exit()
else:
  print(-(-(H*W)//2))
  sys.exit()

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

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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


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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def solve():
    if w==1 or h==1:
        print(1)
        return
    ans = 0
    ans += math.ceil(w/2)*math.ceil(h/2)
    ans += (w//2)*(h//2)
    print(ans)
    return

if __name__=='__main__':
    h,w = IL()
    solve()

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

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

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

Solution (Python):
import math
A = list(map(int, input().split()))
H = A[0]
W = A[1]

first = math.ceil(H/2)
second = math.floor(H/2)
if H>= 2 and W>=2:
  ans = math.ceil(W/2)*first + math.floor(W/2)*second
elif W==1:
  ans = 1
elif H==1:
  ans = 1
  
print(ans)

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

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

Solution (Python):
import math


def resolve():
    import sys
    input = sys.stdin.readline
    row1 = [int(x) for x in input().rstrip().split(" ")]
    h = row1[0]
    w = row1[1]

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

    ans = (h-(h%2))*(w-(w%2))/2
    ans += (h%2)*(w-(w%2))/2
    ans += (w%2)*(h-(h%2))/2
    ans += (w%2)*(h%2)

    print(int(ans))


if __name__ == "__main__":
    resolve()

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







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

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

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

Solution (Python):

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

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

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

H_ = H % 2
W_ = W % 2

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

elif H_ == 0:
    print(str(round(H/2*W//1)))

elif H_ == 1:
    h = H // 2 + 1
    h_ = H // 2
    if W_ == 0:
        print(str(round((h + h_)*W/2)))

    elif W_ == 1:
        w = W // 2+1
        w_ = W // 2
        print(str(round(h * w + h_ * w_)))

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):
import numpy as np

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

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

Solution (Python):











def solve(n,m):
  if n == 1 or m == 1:
    return 1
  else:
    return (n*m + 1)// 2



def main():
  N,M = map(int,input().split())
  
  print(solve(N,M))
  return

if __name__ == '__main__':
  main()

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

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

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

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

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

elif P%2 == 0:
  print(int(P/2))
else:
  print(int(P/2)+1)

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

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

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

    if H == 1 or W == 1:
        print(1)
        
    else:
        L1 = 0
        L2 = 0

        L1 = L2 = W // 2

        if W % 2 == 1:
            L1 += 1

        ans = (L1 + L2) * (H//2)

        if H % 2 == 1:
            ans += L1

        print(ans) 

if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

H,W = MI()

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

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

Solution (Python):

 

 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools


 








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

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

print(ceil(H/2)*ceil(W/2) + floor(H/2)*floor(W/2))

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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

res = math.ceil((H*W)/2)
print(res)

Solution (Python):


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

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

print(ans)

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

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

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

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

print(math.ceil(h*w/2))

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

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

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

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

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

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

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

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

print(int(ans))

Solution (Python):

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

cnt = 0

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

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

print(cnt)

Solution (Python):
import numpy as np

l = list(map(int, input().split()))
a = l[0]
b = l[1]

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

else:
    print(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())
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)
  exit()

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

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

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

Solution (Python):
H, W = map(int, input().split())
 
ans = 0
 
if H%2==0:
  a = H // 2
  b = H // 2
else:
  a = H // 2 + 1
  b = H // 2

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

print(ans)

Solution (Python):
import math

H, W = map(int, input().split())
    
ans = int(H / 2) * W
if (H % 2) == 1:
    ans += math.ceil(W / 2)

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

print(ans)

Solution (Python):
import math

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

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

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

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

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

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

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

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

print(res)

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

Solution (Python):

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


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    resolve()

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