peterverebics/CodeNet_Python_118 huggingface dataset:
# -*- coding: utf-8 -*-
from collections import defaultdict
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

H, W = inpl()
if (min(H, W) == 1):
    print(1)
elif (H%2 == 0):
    print(H*W//2)
else:
    print(H*(W//2) + -(-H//2)*(W%2))
h, w = map(int, input().split())
if h == 1 or w == 1:
  print(1)
else:
  print((h*w-1)//2+1)
import math

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

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

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

if H == 1 or W == 1:
    print(1)
else:
    print(X)
import math
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(1)
    exit()

if h % 2 == 0:
    print(w * h // 2)
else:
    print(w * (h // 2) + (math.ceil(w / 2)))
h,w = map(int,input().split())
if w == 1 or h == 1:
    ans = 1
    
else:
    if h % 2 ==0:
        tate = h // 2
        ans = tate * w
    else:
        tate = h // 2 + 1
        if w % 2 == 0:
            ans = (2 * tate - 1) * (w // 2)
        else:
            ans = (2 * tate - 1) * (w // 2) + tate
print(ans)
import math
h, w = map(int, input().split())
ans = math.ceil(h * w / 2)
if h == 1 or w == 1:
    ans = 1
print(ans)
import sys
input = sys.stdin.readline

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

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

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

# type2
b = H // 2

# type1
a = H - b

ans += b * (W // 2)
ans += a * (W - (W // 2))

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

if W==1 or H==1:
  print(1)
  exit()
  
if W%2==0:
  print(H*W//2)
else:
  if H%2==0:
    print(W*H//2)
  else:
    print(W*(H//2)+W//2+1)
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
h, w = [int(i) for i in input().split()]
if h == 1 or w == 1:
    print(1)
else:
    n = h*w/2
    print(Decimal(n).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from math import ceil
r, c = map(int, input().split())
if r == 1 or c==1:
    print(1) # because 0 or 1 movements
else:
    print(ceil((r * c) / 2))
H, W = map(int,input().split())
A = H * W
if H == 1 or W == 1:
    print(1)
elif A % 2:
    print(A // 2 + 1)
else:
    print(A // 2)
import math
H, W = [int(i) for i in input().split()]
print(math.ceil(H/2)*math.ceil(W/2)+(H//2)*(W//2) if H > 1 and W > 1 else 1)
import math
h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
else:
    print(math.ceil(h*w/2))
H, W = map(int, input().split())

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

if h == 1 or w == 1:
    print(1)
else:
    if (h * w) % 2 == 1:
        print(int((h * w) / 2 + 1))
    else:
        print(int((h * w) / 2))
# coding: utf-8
# Your code here!
a,b=map(int, input().split())

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

if W == 1:
    N = 1

elif H == 1:
    N = 1

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

print(int(N))
h,w = map(int,input().split())
x = h*w
if h == 1 or w == 1 :
    print(1)
elif x % 2 == 0:
    print(x//2)
else :
    print(x//2+1)
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)
a,b=map(int,input().split())
if (a == 1 or b == 1):
  print(1)
else:
  print ((a*b+1)//2)
import sys
import itertools
import math
from collections import deque
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

  numb = W//2
  numa = W - numb

  numd = H//2
  numc = H - numd
  ans = numa * numc + numb * numd

  print(ans)
#!/usr/bin/env python3
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)
h, w = [int(x) for x in input().split()]

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

print(ans)
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

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

if __name__ == '__main__':
    main()
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)
H,W=list(map(lambda i:int(i),input().split()))
masume=H*W
if (H==1) or (W==1):
    answer =1
elif masume%2 ==0:
    answer = masume//2
else:
    answer = (masume+1)//2
print(answer)
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7

h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
    quit()
print(math.ceil(h*w/2))
import sys
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(1)
    sys.exit()
if w % 2 == 0:
    a = (w//2) * 2
    b = (w//2)
else:
    a = (w//2) * 2 + 1
    b = (w//2) + 1
if h % 2 == 0:
    print(a * (h//2))
else:
    print(a * (h//2) + b)
import sys
import math
input = sys.stdin.readline

h, w = map(int, input().split())
ans = math.ceil(w / 2) * math.ceil(h / 2) + math.floor(w / 2) * math.floor(h / 2)
if h == 1 or w == 1:
    ans = 1
print(ans)
# -*- coding: utf-8 -*-
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()
import math
n,w=map(int,input().split())
if n==1 or w==1:
    print(1)
else:
    ans=math.ceil(w/2)*math.ceil(n/2)+(w//2)*(n//2)
    print(ans)
import math

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

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

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

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

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, W = lr()
if H == 1 or W == 1:
    answer = 1
elif H % 2 == 0:
    answer = H//2 * W
elif W % 2 == 0:
    answer = W//2 * H
else:
    #どちらも奇数
    #下一段を別に数える
    answer = H//2 * W
    answer += (W+1) // 2
print(answer)
h,w = map(int,input().split())

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

if h > 1 and w == 1:
    ans = 1
elif w > 1 and h == 1:
    ans = 1

print(ans)
import numpy as np


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

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

if H == 1 or W == 1:
    print(1)
else:
    print((H * W + 1) // 2)
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)
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    H, W = map(int, input().split())

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


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

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

t = (H * W) // 2
t += (H * W) % 2

print(t)
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)
h, w = map(int,input().split())
if h == 1 or w == 1:
  print(1)
else:
  print((h*w+1)//2)
from math import ceil
n, k = map(int, input().split())
if n==1 or k==1:
    print(1)
else:
    print(ceil(n*k/2))
[H, W] = [int(i) for i in input().split()]
if H == 1 or W == 1:
  ans = 1
elif H * W % 2 == 0:
  ans = int(H * W / 2)
else:
  ans = int(H * W / 2) + 1
print(ans)
l = list(map(int, input().split()))
x=l[0]*l[1]
if l[0]==1 or l[1]==1:
    print('1')
elif x%2==0:
    print(int(x/2))
else:
    print(int(x//2)+1)
H, W = map(int, input().split())
if H > 1 and W > 1:
    print(abs(-(H*W)//2))
else:
    print(1)
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)
x = list(map(int,input().split(" ")))
h = x[0]
w = x[1]

ans = 0
if h == 1:
    print(1)
elif w == 1:
    print(1)
elif h % 2 == 0:
    ans = int(h/2 * w)
    print(ans)
elif (h % 2 != 0) and (w % 2 == 0):
    ans = int(h * w/2)
    print(ans)
elif (h % 2 != 0) and (w % 2 != 0):
    ans = int((h//2 +1) * (w//2 +1)) + (h//2 * (w - 1 - w//2))
    print(int(ans))
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(w*(h//2)+(w+1)//2)
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(1)
    exit()
if (h * w )%2:
    print((h*w)//2+1)
else:
    print((h*w)//2)
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))
import math
N, M = map(int , input().split())
if N == 1 or M == 1:
    print(1)
    exit(0)
print(math.ceil(N * M / 2))
import math
h,w=map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  print(math.ceil(h*w/2))
def div_ceil(x, y): return (x + y - 1) // y

H, W = map(int, input().split())
ans = div_ceil(W, 2) * div_ceil(H, 2) + (W // 2) * (H // 2)
print(ans if H != 1 and W != 1 else 1)
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))
h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
    exit()
if h%2==0 and w%2==0:
    print(h*w//2)
if (h+w)%2!=0:
    print(h*w//2)
if h%2!=0 and w%2!=0:
    num=(min(h,w)+1)//2
    num1=(max(h,w)+1)//2
    ans=num*num1+(num1-1)*(min(h,w)-num)
    print(ans)
H, W = map(int,input().split())
from math import ceil
if W ==1 or H==1:
    print(1)
else:
    print(ceil((W*H)/2))
h, w = map(int, input().split())
ans=(h//2)*(w//2)*2
if h==1 or w==1:
    print(1)
else:
    if h%2==1:
        ans+=w//2
    if w%2==1:
        ans+=h//2
    if h%2==1 and w%2==1:
        ans+=1
    print(ans)
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    h,w = mi()

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

if __name__ == "__main__":
    main()
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()
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)
n,m=map(int,input().split())
if n==1 or m==1:
    print(1)
else:
    print(-((-n*m)//2))
from math import ceil, floor

data = input().split()
h, w = [int(i) for i in data]

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

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

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

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

s = h * w

if s % 2:
    print(s//2+1)
else:
    print(s//2)
H, W = map(int, input().split())
if H % 2 == 0 and not W == 1:
    A = (H / 2) * W
elif H == 1:
    A = 1
else:
    if W % 2 == 0 and not H == 1:
        A = (((H + 1)/2)*(W / 2)) + ((((H + 1)/2)-1)*(W / 2))
    elif W == 1:
        A = 1
    else:
        A = ((H + 1)/2)*((W + 1)/2) + (((H + 1)/2) - 1)*(((W + 1)/2) - 1)
print(int(A))
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    H, W = lr()
    a = H*W
    if H == 1 or W == 1:
        print(1)
    elif a%2 == 1:
        print((a+1)//2)
    else:
        print(a//2)
    return
resolve()
import math
if __name__ == "__main__":
    H, W = map(int, input().split())
    ret = H * W
    if H == 1 or W == 1:
        ret = 1
    elif ret % 2 == 0:
        ret = ret / 2
    else:
        ret = math.floor(ret / 2) + 1
    print(int(ret))
H,W = map(int, input().split())

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

print(ans)
def resolve():
    h,w=map(int, input().split())
    if h==1 or w==1:
        print(1)
    else:
        print(-(-h*w//2))
resolve()
H,W=map(int,input().split())

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

if h == 1 or w == 1:
    print(1)
else:
    if h % 2 == 0:
        print(h*w//2)
    else:
        print((h-1)*w//2 - (-w//2))
# 奇数と奇数の時だけ 積 // 2 に + 1 する

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

if a == 1 or b == 1:
    print(1)

elif a % 2 == 1 and b % 2 == 1:
    print(a * b // 2 + 1)
    # print("a")

else:
    print(a * b // 2)
    # print("b")
H,W = map(int,input().split())

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

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

ans = 1
if h != 1 and w != 1:
    ans = (h//2) * w
    if h%2 == 1:
        c = w - w//2
        ans += c

print(ans)
H,W=map(int,input().split())
A=H*W
if H==1 or W==1:
    print(1)
elif A%2==0:
    print(A//2)
else:
    print(A//2+1)
import math
h,w=map(int,input().split())
ans=math.ceil(h*w/2)
if h==1 or w==1:
    ans=1
print(ans)
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 //2) + W % 2)
H,W = list(map(int,input().split()))
if H == 1 or W == 1:
  print(1)
  exit()
HE = H//2
HO = H - HE
WE = W//2
WO = W - WE
print(HO*WO+HE*WE)
a,b=map(int, input().split())
ans=0
if a==1 or b==1:
    print(1)
    exit()
ans+=(b//2+(b%2))*(a//2+(a%2))
ans+=(b//2)*(a//2)
print(ans)
H, W = map(int, input().split())
if W % 2 == 0: a = W // 2
else: a = W//2 + 1

if H == 1 and W >= 1: print(1)
elif W == 1 and W >= 1: print(1)
else: print(W *(H//2) if H % 2 == 0 else W *(H//2) + a)
a,b=map(int,input().split())
if a==1 or b==1:
    print (1)
else:
    print (((a*b)+1)//2)
x,y = map(int,input().split())
if x == 1 or y == 1:
    print(1)
elif (x*y)%2==1:
    print(((x*y)//2)+1)
else:
    print(x*y//2)
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)
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))
a, b = (int(x) for x in input().split())
 
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))
arr = input().split()
h=int(arr[0])
w=int(arr[1])
 
if w*h%2!=0 and h!=1 and w!=1:
    ans=(w*h+1)//2
elif h==1 or w==1:
    ans=1
else:
    ans=w*h//2
print(ans)
import math
h, w = map(int, input().split())
print(math.ceil((h * w) / 2) if h != 1 and w != 1 else 1)
h,w = map(int,input().split())
if h==1 or w==1:
    print(1)
    exit()
m = (h//2) * (w//2)
if h%2==0 and w%2==0:
    n = m
elif h%2==0 and w%2==1:
    n = (h//2) * (w//2+1)
elif h%2==1 and w%2==0:
    n = (h//2+1) * (w//2)
else:
    n = (h//2+1) * (w//2+1)
print(m+n)
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 )
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(1)
    exit()
ans = 0
ans += ((w // 2) + (w % 2)) * (h // 2 + h % 2) + (w // 2) * (h // 2)

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

n = a*b

if a == 1 or b == 1:
    print(1)
elif n % 2 == 1:
    print(n//2 + 1)
else:
    print(n//2)
import math
H,W = map(int, input().split())

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

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

if w%2!=0:
    x,y = w//2 + 1, w-(w//2+1)
else:
    x = y = w//2
print(x*round(h/2) + y * h//2)
H, W = map(int, input().split())
if H % 2 == 0 or W % 2 == 0:
  print(W * H // 2)
else:
  total = H * (W//2) + H//2 + 1
  print(total)
H, W = map(int, input().split())
res = H * W
if H == 1 or W == 1:
    ans = 1
if res % 2 == 0:
    ans = res // 2
else:
    ans = res//2+1
print(ans)
h,w = map(int, input().split())
area = h*w
ans =  (-area) // 2
print(-ans)
A, B = map(int, input().split())
print((A * B + 1) // 2)
H, W = input().split(' ')
H = int(H)
W = int(W)
print(int(H*W/2 + 0.5))
H, W = input().split()
H = int(H)
W = int(W)
result = (W + 1)/2
if H % 2 == 0:
    even_row = H / 2
else:
    even_row = (H-1)/2
odd_row = H - even_row
result2 = (result-1)*even_row
result1 = result*odd_row
print(result1+result2)
h, w = [int(x) for x in input().split()]

if h%2 == 0 and w%2 == 0:
  print((h*w)//2)
else:
  print((h*w)//2+1)
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    h,w = map(int, input().split())
    
    print(max(ceil(h/2) * ceil(w/2) + floor(w/2)*floor(h/2), h*w//2+1))
        

    return

if __name__ == '__main__':
    main()
H, W = list(map(int, input().split()))
### 片方だけ奇数のマスには行くことができない
### Hが偶数、Wが偶数の場合 → H*W // 2
### Hが奇数、Wが偶数の場合 → H*W // 2 (Wが奇数の場合も同様)
### Hが奇数、Wが奇数の場合 → H*W // 2 + 1
if H % 2 != 0 and W % 2 != 0:
    print(H * W // 2 + 1)
else:
    print(H * W // 2)
import math
a=input().split(' ')

print(math.ceil(int(a[0])*int(a[1])/2))
H, W = map(int, input().split())
print(-(-H*W // 2))
h, w = map(int, input().split())
print(round(h*w))
import math
H, W = map(int, input().split())

if H == 1 or W == 1:
    print(0)
    exit()
    
print(math.ceil((H * W) / 2))
from sys import stdin
h,w = [int(x) for x in stdin.readline().rstrip().split()]
import math
def bishop(h,w):
    if h == 1:
        ans = 1
    else:
        ans = int(w/2)*h + (w%2)*math.ceil(h/2)
    print(ans)
    return
import math
h,w = map(int, input().split())
a = math.ceil(h*w/2)
print(a)
s = input().split()
W = int(s[0])
H = int(s[1])

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

print(int(out))
h,w=map(int,input().split())
#b=[[0]*h for i in range(w)]
#print(b)->b[width][height]
print((h*w+1)//2)
h,w = map(int, input().split())
total = h * w

if w % 2: #wide size = odd
    if h % 2: #both wide, high = odd
        ans = (total + 1)/2
        print(ans)
        exit()
ans = total/2
print(ans)
h, w = map(int, input().split())
hei = int(h / 2) if h % 2 == 0 else (int(h / 2) + 1)
# print(hei)
wid = int(h / 2) if h % 2 == 0 else int((h - 1) / 2)
# print(wid)

# print((w / 2) * (hei + wid))
# print(w % 2)
res = int(w / 2) * (hei + wid) if w % 2 == 0 else (int(w / 2) * (hei + wid)) + hei
print(res)
h, w = map(int, input().split())

ans = 0
if h == 0 or w == 0:
    ans = 0
else:
    r, c = h//2, w//2
    ans = r * c
    if h%2 == 1:
        r = h//2  + 1

    if w%2 == 1:
        c = w//2 + 1

    ans += r * c

print(ans)
import math
H, W = map(int, input().split())
if H % 2 == 1 and W % 2 == 1:
    print(math.ceil(H*W/2))
else:
    print(int(H*W/2))
H, W = (int(x) for x in input().split())

if H * W == 1:
    k = 1
elif H*W % 2 == 1:
    if (H == 1 or W == 1) and H*W != 1:
        a = list(filter(lambda x: x != 1, [H, W]))
        k = int(a[0] / 2) + 1
    else:
        k = int(H / 2) + (int(W / 2)) * H + 1
elif H * W % 2 == 0:
    k = int(H * W / 2)

print(k)
#!/usr/bin/env python3
import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
H, W = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

NMASU = H * W
if NMASU % 2 == 0:
    print(NMASU // 2)
elif NMASU == 1:
    print(1)
else:
    print(NMASU // 2 + 1)
h,w = map(int,input().split())
if (h*w)%2 == 0:
  print((h*w)//2)
else:
  print(((h*w)//2)+1)
h,w = map(int,input().split())
if h==1 or w ==1:
  print(0)
  exit()
ans = h * w
if ans %2 == 0:
  print(ans // 2)
else:
  print(ans // 2 + 1)
import math
h, w = map(int, input().split())
if(h%2 == 0):
    print(int(w*(h//2)))
else:
    print(int(w*(h//2) + math.ceil(w/2)))
H,W = map(int,input().split())

if H % 2 == 0:
    t = H // 2
    u = H // 2
else:
    t = H // 2 + 1
    u = H // 2

if W % 2 == 0:
    print ((t+u) * (W//2))
else:
    print (t * (W//2+1) + u * (W//2))