peterverebics/CodeNet_Python_118 huggingface dataset:
H,W = map(int,input().split())
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
ans = ceil(W/2)*ceil(H/2) + (W//2)*(H//2)
print(ans)
H,W = list(map(int,input().split()))

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

res = 0

#odd : (W+1) // 2
#even : W // 2

r = (W+1) // 2 + W // 2
if H % 2 == 0:
  print( r * (H // 2))
else:
  print( r * (H // 2) + (W+1)//2)
H, W  = map(int, input().split())
result = int(H*W/2) + H*W%2
print(result)
h, w = map(int, input().split())
print((h // 2) * (w // 2) + (h // 2 + h % 2) * (w // 2 + w % 2))
number = input().split(" ")
H = int(number[0])
W = int(number[1])
if H%2 == 0:
    print((H*W)//2)
else:
    print((H*W)//2 + 1)
import math
h, w = map(int, input().split())

ans = math.ceil(h*w/2)

print(ans)
h,w = map(int, input().split())
if h%2==0:
  hh = int(h/2)
  print(int(hh*w))
else:
  hh = int(h/2)+1
  if w%2==0:
    print(int(h*(w/2)))
  else:
    print(int(h*(w-1)/2+hh))
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

# 総マス数が偶数になる場合、半数が答え
total = h * w
if total % 2 == 0:
    print(int(total / 2))
    exit()

# 問題は奇数の場合
# 高さが奇数の場合、奇数列はh//2+1 偶数列はh//2
if h % 2 != 0:
    odd_column = (h//2 + 1) * (w//2 + 1)
    even_column = (h//2) * (w//2)
    res = odd_column + even_column

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

print(-((-H * W)//2))
import math
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)

H,W = nm()
print((H * W + 1)//2)
h,k = map(int,input().split())

hh = h%2
kk = k%2

hm = int(h/2)
km = int(k/2)

if (h == 1 and k <=2) or (h <= 2 and k == 1):
    ans = 1
elif hh == 0 and kk==0:
    ans = hm*k
elif hh == 1 and kk == 0:
    hm = 2*hm +1
    ans = hm*km
elif hh == 0 and kk == 1:
    ans = hm * k
elif hh == 1 and kk == 1:
    hhm = 2 * hm + 1
    ans = hhm * (km+1) - hm

print(ans)
H,W = [int(i) for i in input().rstrip().split()]
if H == 1 or W == 1:
    print(0)
print((H*W+1)//2)
H,W = list(map(int,input().split()))
 
if H==1 or W==1:
  print(1)
  exit()
 
if H%2==0:
  ans = W * (H//2)
else:
  ans = W * (H//2) + (W//2+1)
  
print(ans)
h, w = map(int, input().split())

ans = h * w // 2
if min(h, w) == 1:
    print(1)
    exit()
if ans % 2 == 1:
    ans += 1
print(ans)
a,b=map(int,input().split())
print(((a+1)/2)*((b+1)/2)+(a/2)*(b/2))
from math import ceil

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

print(int(ceil(H * W / 2)))
h, w = map(int, input().split())
ans = (h * w + 1) // 2
print(ans)
from math import *
n,m = input().split(' ')
if(n==1 or m==1):
    print(0)
else:
    print(ceil((int(n)*int(m))/2))
def main(w,h):
    x1 = int(w/2 if w%2 == 0 else (w+1)/2)
    x2 = int(w/2 if w%2 == 0 else (w-1)/2)
    if(h%2 == 0):
        res = (h/2)*(x1+x2)
    else:
        res = ((h-1)/2)*(x1+x2) + x1
    return int(res)

h,w = map(int, input().split())
print(main(w,h))
import numpy as np
import sys
h,w = map(int,input().split())
if w%2 == 0:
    if h%2 == 0:
        print(((w//2)*(h//2))*2)
    else:
        print((w//2)*h)
else:
    if h%2 == 0:
        print((w//2+1)*(h//2) + (w//2)*(h//2))
    else:
        print((w//2+1)*(h//2+1) + (w//2)*(h//2))
a = [int(x) for x in input().split(" ")]
if a[1] <= 0 :
    print(0)
    exit()
kisu = a[0] // 2 if a[0] % 2 == 0 else a[0] // 2 + 1
gusu = a[0] // 2
yokokisu = a[1] // 2 if a[1] % 2 == 0 else a[1] // 2 + 1
yokogusu = a[1] // 2
ans = kisu * yokokisu + gusu * yokogusu
print(ans)
h, w = map(int, input().split())
a = h*w

if h == 1 or w == 1:
    print(0)
elif a % 2 == 0:
    print(a//2)
else:
    print((a+1)//2)
import math
a, b = map(int, input().split())
print(math.ceil(a*b/2))
H,M = map(int,input().split())
print(0 if H==M==1 else (H*M+1)//2)
a = input().split()
b = int(a[0]) // 2
c = int(a[0]) % 2
if c == 0:
  print(int(int(b) / 2 * int(a[1])))
else:
  print(int(int(b) * int(a[1]) + int(a[1]) // 2 + 1))
R,C = list(map(int, input().split()))

if R % 2 == 0:
    print(int(R / 2 * C))
else:
    if C % 2 == 0:
        print(int(((R // 2 + 1) + (R // 2)) * C / 2))
    else:
        print(int((R // 2 + 1)*(C//2+1) + (R // 2)*(C//2)))
A, B = map(int, input().split())
print(round(A/B))
base = input().split()
h = int(base[0])
w = int(base[1])
if h%2==1:
    ha = (h//2)+1
    hb = ha-1
else:
    ha = h/2
    hb = ha
g = w//2
if w%2==1:
    ans = ha*(g+1)+hb*g
else:
    ans = (ha+hb)*(w/2)
print(int(ans))
import math

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

ans = ( H * W )/ 2
print(math.ceil(ans))
h,w = map(int,input().split())
if h%2 == 0 or w%2 == 0:
    print(int(h*w/2))
else:
    print(int((h-1)/2 * w + (w+1)/2))
h, w = map(int, input().split())
print(-(-h*w//2))
import sys
import math
input=sys.stdin.buffer.readline
h,w=map(int,input().split())
print(math.ceil(h*w/2))
h, w = map(int, input().split())
print(h*w//2)
#!python3.4.3

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

s = h * w

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

if h*w%2==0:
  print(h*w/2)
else:
  print(h*w/2+1)
import math
a,b = list(map(int, input().split()))

print(math.ceil((a*b)/2))
h,w=map(int,input().split());print((h*w+1)//2)
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: exit(print(1))
a1 = h//2 + 1 if h % 2 != 0 else h//2
a2 = h - a1
a3 = w//2 + 1 if h%2!=0 else w//2
a4 = w - a3
ans = a1*a3 + a2*a4
print(ans)
H,W = map(int,input().split())
print((H*W+1)//2)
h, w = [int(x) for x in input().split()]

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

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)
HW=input().rstrip('\n').split()
H=int(HW[0])
W=int(HW[1])
if H%2==1 and W%2==1 :
    print (int(H*W+1/2))
else :
    print(int(H * W / 2))
h, w = map(int, input().split(' '))
ans = h * w


def result():
    if ((ans % 2) == 1):
        print((ans // 2) + 1)
    elif((ans % 2) == 0):
        print(ans // 2)


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

h2 = h // 2
row = (w+1) // 2

num2 = h2 * w
if h % 2 == 1:
    num2 += row

print(num2)
H, W = map(int, input().split())
print((H*W+1)//2)
h,w = map(int,input().split())
a = int((h / 2) + (h % 2)) * int((w / 2) + (w % 2)) 
b = int(h / 2) * int(w / 2)
print(a + b)
from math import ceil
h,w = map(int,input().split())
if (h*w)%2 == 0:
  print((h*w)/2)
else:
  print(ceil((h*w)/2))
import math
H,W=map(int,input().split())
if W==1:
    print(1)
else:
    A=math.ceil(H*W/2)
    print(A)
h, w = map(int, input().split())
w2 = w // 2
h2 = h // 2
if(w%2==0):
    print(w2 * h)
else:
    if(h%2==0):
        print(w * h2)
    else:
        print(w * h2 + w2 + 1)
H,W = map(int,input().split())

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

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

num_of_even = int(H / 2)
num_of_odd = H - num_of_even

count = 0

count += int(W / 2) * num_of_even
count += math.ceil(W / 2) * num_of_odd

print(count)
import sys
H, W = map(int, sys.stdin.readline().rstrip().split())

if W == 1:
    print(1)
else:
    h_syou, h_amari = divmod(H, 2)
    w_syou, w_amari = divmod(W, 2)
    if w_amari == 0:
        print(w_syou * H)
    else:
        print((w_syou * H) + h_syou + h_amari)
H, W = map(int, input().split())

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

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

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

else:
  x1 = W//2 + 1
  x2 = W//2
  if H % 2 == 0:
    result = int((x1+x2)*H/2)
    print(result)
  
  else:
    result = int((x1+x2)*(H//2) + x1)
    print(result)
h, w = map(int,input().split())

ans = w * (h // 2)
if h % 2 == 1:
    if w % 2 == 0:
        ans += w // 2
    else:
        ans += (w // 2) + 1 
print(ans)
a,b = map(int,input().split())
if a%2==0:
    print(b*(a//2))
else:
    if b%2==0:
        print((a//2)*(b//2)+(a//2+1)*(b//2))
    else:
        print((a//2)*(b//2)+(a//2+1)*(b//2+1))
arg = input().split(' ')
H = int(arg[0])
W = int(arg[1])

w_odd = W // 2 if W % 2 == 0 else (W+1) // 2
w_even = W // 2

h_odd_line = (H+1) // 2
h_even_line = H // 2

reachable = (w_odd * h_odd_line + w_even * h_even_line)
print(reachable)
import math

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

main()
def main():
    H,W = map(int,input().split())
    N = H*W

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

    elif N%2 == 0:
        ans = N/2
    else:
        ans = (N//2) + 1

    return ans

print(main())
import math
a,b=map(int, input().split()) 


if a*b%2 == 0:
	print(a*b/2)
else:
	print(math.floor(a*b/2)+1)
H,W = map(int,input().split())
if H%2==1 and W%2==1:
    print(int((W*H+1)/2))
else:
    print(int(W*H/2))
h, w = map(int, input().split(" "))
ans = (h//2) * w 
if h % 2 == 1:
    ans = ans + ((w//2) + w%2)
print(ans)
h,w=map(int,input().split())
ans=(w+1)//2*h
if w%2==0:
    print(ans)
else:
    print(ans-h//2)
H, W=map(int,input().split())
if H%2==0:
    print(H//2*W)
elif W%2==0:
    print(W//2*H)
else:
    print((H//2)*W+((W+1)//2))
h, w = map(int, input().split())

num = h * w

if num % 2 == 0:
    print(num // 2)
else:
    print(num // 2 + 1)
a, b= map(int, input().split())
if (a * b)%2 == 0:
    print((a*b)/2)
else:
    print((a*b)-(a+b))
h,w = map(int,input().split())
h_0 = 0
ans = 0
if h == 1 or w == 1:
    ans = 1
else:
    if h % 2 == 0:
        h_0 = h/2
        h_1 = h - h_0
    else:
        h_0 = (h//2) + 1
        h_1 = h - h_0

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

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

if __name__ == '__main__':
    main()
h, w = [int(x) for x in input().split()]

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

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

if a==1 or b==1:
    print(0)
else:
    print((a*b+1)//2)
a, b= map(int, input().split())
if (a * b)%2 == 0:
    print((a*b)/2)
else:
    print(((a-(a%2))*((b-(b%2)))-1))
n,m=map(int,input().split())
ans=(n*(m//2)+((n//2)+(n%2))*(m%2))
num=n
n=m
m=num
print(max(n*(m//2)+((n//2)+(n%2))*(m%2),ans))
h, w = [int(i) for i in input().split()]

ans = 0

ans = h*w//2
ans += h*w%2
print(ans)
H, W = map(int,input().split())
print(-(-H*W//2))
h,w=map(int,input().split())
print(h//2*(w//2)+-~h//2*(-~w//2))
from math import ceil
a,b=map(int,input().split())
print(ceil((a*b)/2))
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(H: int, W: int):
    ret = ((W + 1) // 2) * ((H + 1) // 2) + (W // 2) * (H // 2)
    print(ret)
    return

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

if __name__ == '__main__':
    main()
H, W = map(int, input().split())
if H % 2 == 0:
    print(H // 2 * W)
elif W % 2 == 0:
    print(W //2 * H)
else:
    print(H // 2 * W + W // 2 + 1)
H, W = [int(e) for e in input().split()]
print((H*W+1) >> 1)
H,W=map(int, input().split())
print(int((H*W-(H%2)*(W%2))/2))
a,b = map(int,input().split())
res = b * (a // 2)
if a % 2 == 1:
    res += (b + 1) // 2
print(res)
def main():
    H, W = list(map(int, input().split()))

    return (H * W + 1) // 2


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

print(ans)
import math
H, W = map(int, input().split(' '))
print(math.ceil(H*W/2))
"""Boot-camp-for-Beginners_Easy006_B_Bishop_25-August-2020.py"""
import numpy as np

H, W = (map(int, input().split()))
if (H*W)%2==0:
    print(int(H*W/2))
else:
    print(int(np.ceil(H*W/2)))
import math

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

print(math.ceil(h*w/2))
H,W=map(int, input().split())
print((H*W-(H%2)*(W%2))//2)
h,w=map(int,input().split())
A=w*h
if h%2==1 and w%2==1:
    print(A//2+1)
else:
    print(A//2)
h, w = map(int, input().split())
print(int(((h * w) + 1)/2))
H,W = map(int, input().split())
sum = 0

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

        
if H == 1 or W == 1:
    sum = 1
    
print(sum)
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

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

resolve()
a,b = map(int,input().split())
if a %2 == 0:
  #たて一列でぬれるのは
  c = int(a/2)
  print(c*b)
else:
  #たて一列目は
  d = int((a+1)/2)
  e = int((a-1)/2)
  if b %2 == 0:
    print(int((d+e)/2*b))
  else:
    print(int((d+e)/2*(b-1)+d))
def main():
    H, W = map(int, input().split())

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


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

if W % 2 == 0:
    print((H * W) // 2)
else :
    odd_row = (W // 2) + 1 
    even_row = W // 2
    if H % 2 == 1:
        odd_row_num = (H // 2) + 1
        even_row_num = H // 2
        print((odd_row*odd_row_num) + (even_row*even_row_num))
    else :
        print((odd_row+even_row) * (H // 2))
H,W = map(int,input().split())

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

else:
    if(H%2 == 0):
        i = H//2
    if(H%2 != 0):
        i = H//2+1
    
    j = H-i

    if(W%2 == 0):
        sum = i*(W//2) + j*(W//2)

    if(W%2 != 0):
        sum = i*(W/2+1) + j*(W/2)
    

    print(sum)
from math import *
n,m = input().split(' ')
if(n==1 and m==1):
    print(1)
else:
    print(ceil((int(n)*int(m))/2))
import math
h,w = map(int,input().split())
if h %2 == 0 or w%2 == 0:
  print(h*w//2)
else:
  print(h*w//2 + 1)
[h, w] = input().split()

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

if(h * w % 2 == 0):
    print(int(h * w / 2))
else:
    print(int(h * w / 2 + 1))
# -*- coding: utf-8 -*-
import numpy as np

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

if h * w % 2 == 0:
    ans = h * w / 2
else:
    ans = h * w // 2 + 1

print(int(ans))
def li():
    return list(map(int, input().split()))


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


def ii():
    return int(input())


H, W = mi()

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

if(h==1 and w==1):
  print(1)
  quit(0)
if(h==2 and w==1):
  print(2)
  quit(0)
  
if(h*w % 2 == 0):
  print(int(h*w/2))
else:
  print(int((h*w + 1)/2))
import math
tate,yoko = map(int,input().split())

if yoko%2 == 0:
    print(int((tate*yoko/2)))
else:
    print(int((tate*(yoko-1)/2 + math.ceil(tate/2))))
h, w = map(int, input().split())
print(h*w//2 + h*w%2)
h, w= list(map(int, input().split()))
ans = h*w/2
if ans == int(ans):
  print(int(ans))
else:
  print(int(ans + 0.5))
H,W = map(int,input().split())

print(W*(H//2)+((W+1)//2*(H%2)))
H,W=map(int,input().split())
print((H*W+1)//2)
import math
a,b=map(int,input().split())
k=a*b+1
print((int)(k/2))
from math import ceil
H, W = map(int, input().split())

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

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

print(int(ceil(H / 2) * x1 + H // 2 * x2))
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)

print(c)
import math
x,y = map(int,input().split())
a=math.floor((x*y+1)/2)
print(a)
H,W = map(int,input().split())
ans = 0
if H%2==0:
  ans = H * W // 2
elif W%2 == 0:
  ans = H * W // 2
else:
  ans = (H * W) // 2 + 1
print(ans)
num = input().split(' ')
H, W = int(num[0]), int(num[1])
HW = H * W
output = int(HW / 2)
if HW % 2 == 0:
	print(output)
else:
	print(output+1)
import math

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



if h%2==1 and w%2==1:

    a = (h//2) * w
    b = math.ceil(w/2)

    print(a+b)
elif h%2==1 and w%2==0:
    a = (h//2) * w
    b = w // 2

    print(a+b)

elif h%2==0 and w%2==1:
    a = (w//2) * h
    b = h//2

    print(a+b)

else:
    print(h*w//2)
h,w=map(int,input().split())
print(-(-h//2)*(-(-w//2))+(h//2)*(w//2))
H, W = map(int, input().split())
if H*W%2 == 0:
    print (H*W//2)
else:
    print (H*W//2+1)
#!/user/bin/env python3
# -*- conding: utf-8 -*-


def count(H, W):
    if W % 2 == 0:
        return int(W * H / 2)
    else:
        w2 = int(W / 2)
        w1 = w2 + 1
        
        if H % 2 == 0:
            return int((w1 + w2) * H / 2)
        else:
            return int((w1 + w2) * int(H / 2) + w1)


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

    print(count(H, W))


if __name__ == '__main__':
    main()
import math
a,b = map(int,input().split())
print(math.ceil(a*b/2))
import math


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


if __name__ == '__main__':
    main()
# coding: utf-8
H,W = list(map(int,input().split()))
ans = H*W/2
if H*W%2==1:
    ans+=1
print(int(ans))
HK=input().split(' ')
H=int(HK[0])
K=int(HK[1])
if K % 2==1 and H%2==1:
    print(round(H*K/2)+1)
else:
    print(int(H*K/2))
import math
n = input().split()
k = int(n[0])*int(n[1])
if int(n[0]) == 1 and int(n[1]) == 1:
  print(0)
else:
  print(math.ceil(k/2))
h, w = map(int, raw_input().strip().split())
str((h * w + 1) / 2)
H,W = map(int, input().split())
if (H*W)%2 == 0:
  print(int((H*W)/2))
else:
  print(int((H*W-1)/2 + 1))
H, W = map(int, input().split())

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

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

if W == 1:
    N = 1

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

print(int(N))
h, w=map(int, input().split())
# 偶数と奇数で場合分け
if h%2==0:
  # 1列でh/2個のマスできるからあとは横何個あるかだけ
  print(h*w/2)
else:
  set1=h
  if w%2==0:
    print(set1*w/2)
  else:
    rm=w//2
    print(set1*rm+h//2+1)
H,W = map(int,input().split())
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
print(ceil(H/2*W))
h,w=map(int,input().split())
print((h*w+1)//2)
import math
H,W=map(int,input().split())
if H==1 or W==1:
  print(1)
else:
  print(H*W/2 if H*W%2==0 else H*W//2+1)
#!/usr/bin/env python

from sys import stdin, stderr

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

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

   print(res)

   return 0

if __name__ == '__main__': main()
h,w = map(int,input().split())
print(bool(h-1)*bool(w-1)*(int(h/2+0.5)*w-(h%2)*int(w/2)))
h,w = map(int,input().split())
s = h*w
if s%2 == 1:
    print((s//2)+1)
else:
    print(s//2)
a,b = list(map(int,input().split()))
if a * b % 2 == 0:
  print(a * b // 2)
else:
  print(a * b + 1 // 2)
N , M = (map(int , input().split()))
t = -(-N//2)
y = -(-M//2)
if M % 2 == 1:
    idou = y - 1
else:
    idou = y

if N % 2 == 0:
     ans = ((y + idou)) * (N//2)
else:
     ans = ((y + idou) * (N//2)) + y
print(ans)
H, W = map(int, input().split())
 
A = H * W
 
if A % 2 == 0:
  print(A // 2)
else:
  print((A - 1) // 2 + 1)
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(0)
    exit()
ans = h*w//2
if h*w % 2 == 1:
    ans += 1

print(ans)
H, W = map(int, input().split())
even_odd = 0
if H % 2 == W % 2 == 1:
    even_odd = 1

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

print(ans)
H, W = map(int, input().split())
ans = H * W // 2
if H == 1 or W == 1:
    ans = 0
elif (H & 1) and (W & 1):
    ans += 1


print(ans)
import math
H, W = map(int, input().split())
print(math.ceil(H*W/2))
if __name__ == '__main__':
	H, W = map(int, input().split())

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

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

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

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

def ABC(a):
    if a%2==1:
        return (a//2)+1
    else:
        return a//2
ans+=ABC(H)*ABC(W)
print(ans)
h,w = map(int,input().split())

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

if h%2:
      H=h//2+1
      print(H*w-(w//2))
      exit()
else:
      H=h//2
      print(H*w)
      exit()
import math
h,w=map(int,input().split())
d,m=divmod(h,2)
print(d*(math.ceil(w/2)+w//2)+math.ceil(w/2)*m)
import math
w, h = map(int, input().split())
print(math.ceil(w*h/2) if w%2==1 and h%2==1 else w*h//2)
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*W % 2 == 0:
    print(H*W // 2)
else:
    print(H*W // 2 + 1)
import numpy as np
import fractions

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