peterverebics/CodeNet_Python_118 huggingface dataset:
h,w = map(int,input().split())

x = h//2 if h%2==0 else h//2+1
y = w//2 if w%2==0 else w//2+1

print(x*y+(h-x)*(w-y))
from math import floor

N = [int(_) for _ in input().split()]

H, W = N[0], N[1]


def solve(H, W):
    
    if H == 1 or W == 1:
        return 1
    
    cnt = int(H * W / 2)
    return cnt

print(solve(H, W))
(n, m) = map(int, raw_input().split())

res = 0

res += ((n + 1) / 2) * ((m + 1) / 2)
res += (n / 2) * (m / 2)
print res
import math
h, w = map(int, input().split())
print(math.ceil(h*w/2))
H,W = (int(x) for x in input().split())
if (H*W)%2==1:
  print(int((H*W-1)//2 + 1))
else:
  print(int((H*W)//2))
H,W = map(int, input().split())
 
if H%2==0:
	print(int((H*W)//2))
 
else:
	print(int(((H+1)*W)//2-(W-1)//2))
h,w = map(int,input().split())
print((h * w)/2)
h, w = map(int, input().split())
first = int(w/2) + 1
second = int((w-1)/2)

if h % 2 != 0:
  odd_row = first * (int(h/2) + 1)
else: 
  odd_row = first * int(h/2)

even_row = second * int(h/2)

print(odd_row + even_row)
a,b=map(int,input().split())
print ((a*b+1)//2)
h, w = list(map(int, input().split()))

masu = h * w
if h * w % 2 == 0:
    print(int(masu / 2))
else:
    print(int(masu / 2) + 1)
H,W = map(int,input().split())
if H % 2 == 1 and W % 2 ==1:
  print((H*W+1)/2)
else:
  print((H*W)/2)
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd
import sys
#input = sys.stdin.readline


#N=int(input())

#A=list(map(int,input().split()))
#XY=[list(map(int,input().split())) for i in range(N)]

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

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

#整数値龍力　複数の入力
def input_multiple_number():
    return map(int, input().split())

h,w = input_multiple_number()


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

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

sum = float(H*W)

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

if h%2 == 0:
    print(w*(h//2))
else:
    print((w*(h//2)) + ((w//2)+1))
h, w = (int(x) for x in input().split())
if w%2 == 0:
    odd_row = w // 2
    even_row = odd_row
else:
    odd_row = w // 2 + 1
    even_row = odd_row - 1
total = (h//2)*even_row + (h-h//2)*odd_row
print(total)
b, c = map(int, input().split())
a = b*c
if a%2 == 0: print(int(a/2))
else: print(int((a + 1)/2))
from math import ceil
H,W=map(int,input().split())
print(int(ceil(H*W/2)))
h, w = map(int, input().split())
print(h*w//2 if h*w%2==0 else h*w//2+1)
# input
H, W = map(int, input().split())

# process
ans = 0
if W == 1:
    print((H+1)//2)

elif H == 1:
    print((W+1)//2)

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

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

if hw[0] % 2 == 0 and hw[1] % 2 == 0:
    count = hw[0] * hw[1] // 2
elif hw[0] % 2 != 0 and hw[1] % 2 == 0:
    count = (hw[0] + 1) * hw[1] // 2 - hw[1] // 2
elif hw[0] % 2 == 0 and hw[1] % 2 != 0:
    count = (hw[1] + 1) * hw[0] // 2 - hw[0] // 2
else:
    count = (hw[0] + 1) * (hw[1] + 1) // 2 - (hw[0] // 2 + 1) - (hw[1] // 2 + 1) + 1
print(count)
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

import math

w_can = W // 2
ans = w_can * H
if W % 2 != 0:
    ans += math.ceil(H / 2)

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

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

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

else:
    print((H * W) // 2 + 1 )
h, w = map(int, input().rstrip().split())
if h % 2 == 1 and w % 2 == 1:
  print(h*w//2 + 1)
else:
  print(h*w // 2)
#!/usr/bin/env python3
h, w = map(int, input().split())
print(((h + 1) // 2) * ((w + 1) // 2) + (h // 2) * (w - ((w + 1) // 2)))
import math

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

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

print(int(ans))
H,W=map(int,input().split())
P=H*W
if P % 2==0:
  print(int(P/2))
else:
  print(int(P/2+1))
import sys
input = sys.stdin.readline
import math

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 = 0
print(ans)
a, b = map(int,input().split())

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

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

if n[0] % 2 == 0:
    print(int((n[0]*n[1])/2))
    sys.exit()
else:
    if n[1] % 2 == 0:
        print(int((n[0]*n[1])/2))
        sys.exit()
    else:
        a = ((n[0]-1)*n[1])/2
        b = n[1] - int(n[1]/2)
        print(int(a+b))
        sys.exit()
import math
H, W = map(int, input().split())
print(math.ceil(H * W  / 2))
from sys import stdin
import math

h, w = [int(x) for x in stdin.readline().rstrip().split()]

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

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

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

print(count)
import math

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

print(math.ceil(H*W/2))
a, b = [int(i) for i in input().split()]
if a*b%2:
  c = a*b
else:
  c = a*b+1
print(c)
import math
H, W = map(int, input().split())
 
ans = 0

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

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

ans = 0

ans += floor(h / 2) * floor(w / 2)
ans += ceil(h / 2) * ceil(w / 2)

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

if W % 2 == 1:
    w = W // 2 + 1
    ans = w * (H // 2) + (w - 1) * (H // 2)
    if H % 2 == 1:
        ans += w
    print(ans)
else:
    w = W // 2
    ans = w * H
    print(ans)
H,W=map(int,input().split())
if H%2==0 or W%2==0:
    print(H*W//2)
elif H==1 or W==1:
    print(1)
else:
    a=int(H*W/2)
    print(a+1)
a,b=map(int,input().split())
if a==b==1:
  print(1)
elif a%2==1 and b%2==1:
  print((a*b)//2+1)
else:
  print(a*b//2)
import numpy as np
import fractions

a,b=map(int, input().split())
if(a%2):
    print(a*b//2+1)
else:
    print(a*b//2)
h, w = map(int, input().split())
if h==1 and w==1:
  print(0)
elif h%2==1 and w%2==1:
  print((h*w+1)//2)
else:
  print(h*w//2)
H,W = map(int,input().split())
if (H*W)%2 == 1:
    print(H*W//2+1)
else:
    print(H*W//2)
w, h = map(int, input().split(' '))
if w%2 == 1 and h%2 == 1:
  t = (w-1)*(h-1)/2
  n = t - 1
else:
  n = (w * h) / 2
  print(n)
H, W = map(int, input().split())
if H % 2 == 0:
    print(H * W // 2)
elif W % 2 == 0:
    print(W * H // 2)
else:
    print((H - 1) * W // 2 + W // 2 + 1)
h,w = map(int, input().split())
area = h*w
ans =  area // 2 +1
print(ans)
def main():
    H, W = map( int, input().split())
    if H%2 == 0 or W%2 == 0:
        print(H*W//2)
    else:
        print(H*W//2+1)
if __name__ == '__main__':
    main()
H,W = map(int, input().split())


print(int((H*W)/2+0.5))
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())
ans = (h*w)//2
if h%2 == 1 and w%2 == 1: ans += 1
print(ans)
from sys import stdin

def main():

    input = stdin.readline

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

    ans = H * W

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

if __name__ == "__main__":
    main()
H,W = map(int, input().split())

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

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

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

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

print(ans)
# Bishop
import math

H,W = list(map(int,input().split(" ")))
if W > 1:
    print(math.ceil((H*W)/2))
else:
    print(0)
from math import *

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

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

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

panels = W * H

if panels % 2  == 0 :
  print(int(panels // 2))
else :
  print(int(panels // 2 + 1))
H,W = map(int,input().split())
ans = 0
wx = W // 2
hx = H // 2
wy = W % 2
hy = H % 2

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

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

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

if H>1 and W>1:
  print(math.floor((H*W+1)/2))
else:
  print(0)
H, W = map(int, input().split())

if H % 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:
  a = H * W
  b = a // 2
  if b != a / 2:
    b += 1
    print(b)
H, W = map(int, input().split())
row_even= H%2 == 0
col_even = W%2== 0
res = 0
if H <= 1 and W<=1:
    res = 1
elif row_even and col_even:
    res = (H*W)//2
elif row_even and not col_even:
    res = W*H//2
elif not row_even and not col_even:
    res = W*(H//2)+W-1
else:
    res = (W//2)*H
print(res)
from math import ceil
H, W = map(int, input().split())

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

sum = float(H*W)

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

board = h * w

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

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

print(ans)
h, w = map(int,input().split())
h1 = (h+1) // 2
h2 = h // 2
w1 = (w+1) //2
w2 = w // 2
print(h1*w1 + h2*w2)
h, w = map(int, input().split())
if h == 1 or w == 1:
    print(0)
else:
    print((h*w+1)//2)
import math

def resolve():
  H, W = [int(i) for i in input().split()]
  print(math.ceil(H*W/2))
  
resolve()
H, W = map(int, input().split())
print(H)
print(W)

w1, w2 = W // 2, W % 2
h1, h2 = H // 2, H % 2

print(h1, h2)
print(w1, w2)

num = 2 * w1 * h1 + w2 * h1 + (w1+1) * h2 
print(num)
from math import ceil
a,b=map(int,input().split())
print(ceil(a*b/2))
h, w = map(int, input().split())

if h % 2 == 0:
  ans = (h // 2) * w
else:
  if w % 2 == 0:
    ans = (h // 2 + 1) * (w // 2) + (h // 2) * (w // 2)
  else:
    ans = (h // 2 + 1) * (w // 2 + 1) + (h // 2) * (w // 2)
    
print(ans)
x,y=list(map(int,raw_input().split()))
w=x
h=y
ans=x//2 * (h//2 + (h+1)//2)
if x%2==1:
     ans+=(h+1)//2
print(ans)
c = [int(i) for i in input().split()]
a = c[0]
b = c[1]

r1 = (int(b/2) + b%2)*(int(a/2) + a%2)
r2 = (int(b/2)) * (int(a/2))

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

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


print(a)
H, W = map(int, raw_input().split())
print (H*W+1)/2
h, w = map(int, input().split())
print((h * w + 1) // 2)
h , w = map(int, input().split())
c = 0

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

if h % 2 == 0 and w % 2 != 0:
	print(w*2)
	exit()
elif h % 2 != 0 and w % 2 == 0:
	print(h*w)
	exit()
H, W = map(int,input().split())

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

print(sum)
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

h,w = miinps()
ans = 0
k = w%2
l = w//2
p = h//2
q = h%2

if h == 1:
  print(1)
  exit()
if k == 1:
  ans += (h*l)
  if q == 1:
    ans += (p+1)
  else:
    ans += p
else:
  ans += (h*l)

print(ans)
from math import ceil, floor

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

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

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

if h % 2 == 0:
    print(w * h // 2)
else:
    print(w * (h // 2) + (math.ceil(w / 2)))
import sys
import os
import math


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    H, W = list(map(int, sys.stdin.readline().split()))

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


if __name__ == '__main__':
    main()
h,w=map(int,input().split())
if h==1 or w==0:
    print(1)
elif h*w%2==0:
    print(h*w//2)
else:
    print(h*w//2+1)
import math
 
l = [int(x) for x in input().split()]
 
print(math.ceil(l[0]*l[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 w % 2 == 0:
  c = w // 2
  d = w - c
else:
  c = w // 2 + 1
  d = w - c
if h % 2 == 0:
  ans = (c+d) * (h//2)
else:
  ans = (c+d) * (h//2) + c
print(ans)
import sys

H, W = map(int, input().split())
if H or W ==1:
    print(1)
    sys.exit()

a = H * W
if a % 2 == 0:
    answer = a // 2
else:
    answer = a // 2 + 1
print(answer)
import math
H, W = map(int, input().split())

if min(H, W) == 1:
  print("1")

n = H * W
ans = (n + 1) / 2
print(math.floor(ans))
A, B = map(int, input().split())
if (A*B) % 2 == 0:
  print(A*B/2)
else:
  print(A*B//2+1)
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

H, W = map(int, input().split())
if H >= 2 and W >= 2:
    ans = math.ceil(H / 2) * math.ceil(W / 2) + (H // 2) * (W // 2)
else:
    ans = 0
print(ans)
n,m = map(int, input().split())
if((m*n)%2 == 0):
    print((m*n)//2)
else:
    print((m*n)//2+1)
H,W=map(int,input().split())
ans=0
if H==1 or W==1:
	ans=1
else:
	if H%2==0:
		ans=H*W//2
	else:
		if W%2!=0:
			ans = H*(W-1)//2+(H//2+1)
print(ans)
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 14 21:11:42 2020

@author: Kanaru Sato
"""

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

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

print(int(ans))
H, W=map(int, input().split())
if H ==1:
    print(1)
else:
    print((H*W+1)//2)
x, y = map(int, input().split())
if (x * y) % 2 == 0:
    print((x * y) // 2)
else:
    print((x * y + 1) // 2)
import math
from decimal import *
import sys
getcontext().prec = 50
#ra = Decimal(a).sqrt()

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

if w % 2 == 0:
	cx0 = int(w // 2)
	cx1 = int(cx0)
else:
	cx0 = int(w // 2 + 1)
	cx1 = int(cx0 - 1)

if h % 2 == 0:
	ans = Decimal(Decimal(h // 2) * Decimal(cx0 + cx1))
else:
	ans = Decimal(h // 2) * Decimal(cx0 + cx1) + Decimal(cx0)

print(Decimal(ans))
H,W = map(int, input().split())
if (H == 1 and W <= 2) or (W == 1 and H <= 2):
    a = 0
else:
    a = int((H*W)/2+0.5)
print(a)
H, W = map(int, input().split())

if W % 2 == 0:
    x = W // 2
    y = W // 2
else:
    x = W // 2 + 1
    y = W // 2

if H % 2 == 0:
    ans = (x + y) * (H // 2)
else:
    ans = (x + y) * (H // 2) + x
print(ans)
# -*- coding: utf-8 -*-
import math

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

ans = 0
q, mod = divmod(H, 2)
if mod == 0:
    ans = W * q
else:
    ans = W * q + math.ceil(W / 2)

print(ans)
h,w=map(int,input().split())
print(h*w+1)
if __name__ == '__main__':
    (h, w) = tuple(map(int, input().split()))
    a = (h * w) // 2 if (h * w) % 2 == 0 else (((h+1) * w) // 2) - w // 2
    print(a)
# coding: utf-8
# Your code here!
x,y = map(int,input().split())
print('{:.0f}'.format((x*y+1)/2))
H,W = map(int,input().split())

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

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

cnt1 = ((H+1)//2)*((W+1)//2)
cnt2 = (H//2)*(W//2)
ans = cnt1 + cnt2
print(ans)
h,w = map(int,input().split())

if h % 2 == 0:
    h = h // 2
else:
    h = h // 2 + 1

if w % 2 == 0:
    w = w // 2
else:
    w = w // 2 + 1

print(h * w)
H, W = map(int, input().split())

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



if x ==1 or y ==1:
  print(1)
  exit(0)
if x%2==0 or y%2==0:
  print(x*y/2)
  exit(0)
a=int(x*y/2)+1
print(a)
h,w = map(int,input().split())
import math
print(math.ceil(h*w/2))
"""Boot-camp-for-Beginners_Easy006_B_Bishop_25-August-2020.py"""
import numpy as np

H, W = list(map(int, input().split()))
#odd
if (H*W)%2==0:
    print(int(H*W/2))
#even
else:
    print(int(np.ceil(H*W/2)))
H,W=map(int,input().split())
if H == 1 or W == 1:
  print(0)
else:
  print((H*W+1)//2)
h, w = map(int, input().split())
ans = h * w //2 + (h*w)%2
print(ans)
H, W = map(int, input().split())
r = (H*W +2-1)//2
print(r)
H,W = map(int,input().split())
 
if (H == 1)or(W == 1):
    sum = 1
elif H % 2 == 0:
    sum = W * H / 2
elif W % 2 == 0:
    sum = (W * (H-1) / 2) + (W / 2)
else:
    sum = (W * (H-1) / 2) + ((W+1) / 2)

print(sum)
import math

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

num=0
for i in range(b):
  if i%2==0:
    num+=math.ceil(a/2)
  else:
    num+=math.floor(a/2)
  
print(num)
s = input()
h = int(s[0])
w = int(s[2])

if w == 1 or h == 1:
    print(1)
else: 
	r = (h*w+1) /2 if h %2 !=0 and w %2 !=0 else h*w/2
	print(int(r))
from decimal import *
H,W=map(int,input().split())
kisuu = H//2 + H%2
gusu = H//2
if W%2 == 1:
	print(Decimal(kisuu) * Decimal((W//2 + 1)) + Decimal(gusu*(W//2)))
else:
	print(Decimal(kisuu) * Decimal((W/2)) + Decimal(gusu) * Decimal((W/2)))
h , w = map(int, input().split())
c = 0

if w % 2 == 0:
	print(h * w // 2)
	exit()
elif w % 2 == 1:
	if h % 2 == 0:
		print(h * w // 2)
		exit()
	elif h % 2 == 1:
		print((h * w // 2) + 1)
		exit()
h, w = map(int, input().split())
print(h * w // 2)
[R, C] = [int(i) for i in input().split()]

if R == 1 or C == 1:
  print(0)
elif R % 2 == 0:
  n = R/2
  print(int(n * C))
else:
  n1 = (R+1) / 2
  n2 = n1 - 1
  c1 = int((C+1)/2)
  c2 = C -c1
  print(int(n1*c1 + n2*c2))
def solve(h, w):
    return (h*w+1) // 2

h, w = map(int, input().split())
print(solve(h, w))
var = [int(s) for s in input().split()]

print(int(var[0]*var[1] / 2 +0.5))
H, W = map(int, input().split())
result=0
if H==1 or W==1:
    print("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)))
import math

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

a = w//2
b = w - a

if h == 1 or w == 1:
    print(1)
    exit()
    
if h%2 == 0:
    ans = a*h//2 + b*h//2
    print(ans)

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

masu_sum = H * W
if H == 1 | W == 1:
    print(1)

if masu_sum % 2 == 0:
    print(masu_sum // 2)
else:
    print(masu_sum // 2 + 1)
import math
h,w  = map(int,input().split(' '))

print(math.ceil(h*w/2))
H, W = map(int, input().split())

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

if H%2==0 or W%2==0:
  ans = int(H*W/2)
else:
  if H==1 or W==1:
    # コーナーケース
    ans = 1
  else:
  	ans = (H*W+1//2)
print(ans)
h, w = map(int, input().split())
ans = w * (h//2)
ans = ans + (h%2) * ((w//2) + w%2)
print(ans)
from decimal import *
import math
i = list(map(int, input().split()))
a = Decimal(i[0])
b = Decimal(i[1])
c = math.ceil(Decimal(a * b / 2))
print(c)
H, W = map(int, input().split())
if 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))
h,w=map(int,input().split())
if (h*w)%2==0:
  print(int((h*w)/2))
else:
  print(int((h*w)//2)+1)
A = [int(a) for a in input().split()]
masu=int(A[0]*A[1]/2+0.5)
print(masu)
s = list(map(int, input().split()))
i=(s[0]*s[1]+(s[0]%2)*(s[1]%2))/2
print(int(i))
import math

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

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


def resolve():
    H, W = map(int, input().split())
    print(math.ceil(H * W / 2))


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

ans = 0
if h == 1 or w == 1:
    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)