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):
import fractions
H, W = map(int, input().split())

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

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

Solution (Python):
import math

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

H = int(H)
W = int(W)

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

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

Solution (Python):
def main():

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

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

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

if __name__ == '__main__':
    print(main())

Solution (Python):
height, width = map(int, input().split())
i, j = 0, 0
if height % 2 > 0:
    i = height // 2 + 1
else:
    i = height // 2

if width % 2 > 0:
    j = width // 2 + 1
else:
    j = width // 2
ans = 0
if height == 1 or width == 1:
    ans = 1
elif height % 2 == 0 and width % 2 == 0:
    ans = j * height
elif height % 2 > 0 and width % 2 > 0:
    ans = j * height - (height // 2)
elif width % 2 == 0:
    ans = j * height
elif height % 2 == 0:
    ans = j * height - (height // 2)

print(ans)

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

Solution (Python):

import math
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/2))
elif h%2==0 and w%2!=0:
    print(int(h*(w-1)/2+math.floor(h/2)))
elif h%2!=0 and w%2==0:
    print(int(w*(h-1)/2+math.floor(w/2)))
else:
    print(int((w-1)*(h-1)/2+math.floor(h/2)+math.floor(w/2)+1))

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

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

if all % 2 == 1:
    print(all//2 + 1)
else:print(all//2)

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

Solution (Python):

from collections import defaultdict
import sys

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

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

Solution (Python):


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


N = int(H * W / 2)

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

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

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

Solution (Python):

import sys
import math


def solve(H: int, W: int):
    
    if H == 1 or W == 1:
        print(1)
        return
    print(math.ceil(H*W/2))
    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))  
    W = int(next(tokens))  
    solve(H, W)

if __name__ == '__main__':
    main()

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

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

print(ans)

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

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

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

print(int(ans))

Solution (Python):



def solve(*args: str) -> str:
    h, w = map(int, args[0].split())
    if h == 1 or w == 1:
        ret = 1
    elif h % 2 == 0:
        ret = (h//2)*w
    elif w % 2 == 0:
        ret = h*(w//2)
    else:
        ret = h*(w//2) + (h//2) + 1
    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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

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

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

Solution (Python):
HW = input().split()
H = int(HW[0])
W = int(HW[1])


tmp = H // 2
tmp2 = H - tmp
wt = W // 2
wt2 = W - wt
ans = tmp * wt + tmp2 * wt2

if H == 1:
  ans = 1
elif W == 1:
  ans = 1

print(ans)

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

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

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

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

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

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

Solution (Python):
from decimal import Decimal

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

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













    





    





    






block = H//2 * W
tip = W//2 if W%2==0 else W//2+1
tip = tip if H%2!=0 else 0


ans = 1 if H==1 or W==1 else block+tip
print(ans)

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

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

Solution (Python):
import sys
import math

for line in sys.stdin:
	a,b=map(int,line.split())
	if(a==1 or b==1):
		print(1)
	elif(a*b%2==0):
		print(int(a*b/2))
	else:
		print(math.ceil(a*b/2))

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

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

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

Solution (Python):
N, M = map(int, input().split())
K=N*M
if N==1 or M==1:
  print(1)
elif K%2==1:
  print(K//2+1)
else:
  print(K//2)

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

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

Solution (Python):
h,w=[int(x) for x in 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:
    res = math.ceil(h*w / 2)
    print(res)

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

def check(x):
    if x%2==0:
        return x//2
    return x//2 + 1

even_row = check(W)
odd_row = check(W-1)
cH = check(H)
total_even_row = even_row * cH
total_odd_ror = odd_row * (H - cH)

if W == 1 or H == 1:
    print(1)
else:
    print(total_even_row + total_odd_ror)

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

if H*W % 2 == 0:
  ans = int(H*W / 2)
else:
  ans = int(H* W / 2) + 1
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)
else:
  print(math.floor(H/2)*math.floor(W/2)+math.ceil(H/2)*math.ceil(W/2))

Solution (Python):
import math
x,y = map(int, input().split())
tot = x*y

if x%2==1 and y%2==1:
    tot = (tot+1)/2
else:
    tot = tot/2
if x <2:
    tot = 1
elif y<2:
    tot = 1
print(math.floor(tot))

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)]




def main():
    h, w = LI()
    if h == 1 or w == 1:
        print(1)
    elif h % 2 == 0 or w % 2 == 0:
        print('{:.0f}'.format(w * h / 2))
    else:
        print('{:.0f}'.format((h * w + 1) / 2))


main()

Solution (Python):
import math
n = input().split()
k = int(n[0])*int(n[1])
if int(n[0]) == 1 or int(n[1]) == 1:
  print(1)
else:
  print(math.ceil(k/2))

Solution (Python):
input = raw_input

h, w = map(int, input().split(" "))
t =  h *w 

if 1 in [h, w]:
    out = 1
else:
    if w % 2 == 1: 
        n1 = 1 + ((w-1) // 2) 
        n2 = ((w-1) // 2)
    else:
        n1 = w // 2
        n2 = n1

    if h % 2 == 1: 
        h1 = 1 + ((h-1) // 2) 
        h2 = ((h-1) // 2)
    else:
        h1 = h // 2
        h2 = h1

    out = h1 * n1 + h2 * n2
print(out)

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

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

Solution (Python):
i = list(map(int, input().split()))
HH = i[0]
WW = i[1]
atai = HH*WW
ans = int(atai/2)
if ((HH % 2) * (WW % 2) == 1):
    ans = ans +1





if ((HH == 1) or (WW == 1)):
    ans = 1
print (ans)

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

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

ceil_H = math.ceil(H / 2)
floor_H = math.floor(H / 2)

ceil_W = math.ceil(W / 2)
floor_W = math.floor(W / 2)

if H == 1 or W == 1:
  print(1)
else:
  print(ceil_H * ceil_W + floor_H * floor_W)

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

Solution (Python):

import sys


def solve(H: int, W: int):
    ans = 0
    if H == 1 or W == 1:
        print(1)
        return
    elif H % 2 == 0:
        ans = (H / 2) * W
    else:
        if W % 2 == 0:
            ans = (H // 2 + 1) * W - (W // 2)
        else:
            ans = (H // 2 + 1) * W - (W // 2)
    print(int(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):
import math

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

h = inputs[0]
w = inputs[1]

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

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

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

if h % 2 == 1:
    ch1 = math.ceil(h/2)
    ch2 = math.floor(h/2)
else:
    ch1 = h//2
    ch2 = h//2
    
if w % 2 == 1:
    cw1 = math.ceil(w/2)
    cw2 = math.floor(w/2)
else:
    cw1 = w//2
    cw2 = w//2
    
ans = ch1 * cw1 + ch2 * cw2

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

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

Solution (Python):
import math

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

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

print(math.ceil(ans))

Solution (Python):

import re
import math
import itertools
from copy import deepcopy
import fractions
import random

from heapq import heappop,heappush
import time
import os
import sys
import datetime
readline=readline = sys.stdin.readline
sys.setrecursionlimit(2000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def fac_list(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s

H,W=map(int,input().split())
if H==1 or W==1:
    print(1)
else:
    gu=((H+1)//2)*((W+1)//2)
    ki=(H//2)*(W//2)
    print(gu+ki)

Solution (Python):
def main():
    H, W = map(int, input().split(" "))
    
    
    c = H * W
    if H == 1 or W == 1:
        print('1')
        return

    if c % 2 == 0: 
        print(c // 2)
    else:
        print((c // 2) + 1)


















        


main()

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

if __name__ == '__main__':
    main()

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):
HK=input().split(' ')
H=int(HK[0])
K=int(HK[1])
if H==1 or K ==1:
    print(1)
else:
    if K % 2==1 and H%2==1:
        print(round(H*K/2)+1)
    else:
        print(int(H*K/2))

Solution (Python):
import numpy as np
import sys
h,w = map(int,input().split())
if h == 1:
    print(1)
    sys.exit()
if w == 1:
    print(1)
    sys.exit()
if w%2 == 0:
    if h%2 == 0:
        print((w//2)*h)
    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))

Solution (Python):
high, wigh = map(int,input().split())
if high == 1:
    print("1")
elif wigh == 1:
    print("1")
else:
    if high % 2 == 1:
        if wigh % 2 == 1:
            print(round(high * wigh/2 + 0.5))
        else:
            print(round(high * wigh/2))
    else:
        print(round(high * wigh/2))

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

Solution (Python):
H, M = map(int,input().split())
l = [H, M]

max = max(l)
min = min(l)

if min == 1:
  N = 1
  
else:
  if max == min:
    if max % 2 == 0:
      N = (H * M) / 2
    else:
      N = (((H * M) - 1)/2)+1

  else:
    r = max - min
    r2 = max - r
    r3 = r * min
    if r2 % 2 == 0:
      n1 = (r2 * r2) / 2
    else:
      n1 = (((r2 * r2) - 1)/2)+1
 
    if r3 % 2 == 0:
      n2 = r3 / 2
    else:
      n2 = (r3 - 1) / 2

    N = n1 + n2
    
print(int(N))

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

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

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

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

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

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



s = math.ceil(w/2)


t = math.floor(w/2)

g = s+t


if(h%2 != 0):
    count =  (math.floor(h/2)) * g + s
elif(h%2 == 0):
    count = (h/2) * g
if(w == 1 or h == 1):
    count = 1



print(int(count))

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

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

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

print(ans)

Solution (Python):
H , W = map  ( int , input().strip().split(" ") ) ; 
s1 = (  H //2 + H %2 ) * ( W //2  + W %2 ) ;
s2 = (  H //2  ) * ( W //2 ) ;

if H == 1 or W == 1 :
	print ( 1 ) ;
else :
	print ( s1 + s2 ) ;

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

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

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

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

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

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

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

syou, amari = divmod(h, 2)
if w % 2 == 1:
    a = w // 2 + 1
    ans = (a + a - 1)* syou + a * amari
else:
    a = w / 2
    ans = (a + a)* syou + a * amari
if h == 1 or w == 1:
    print(1)
else:
    print(int(ans))

Solution (Python):
def main() :
    H,W = map(int,input().split())
    if (H == 1 or W == 1) :
        print(1)
        return

    odd_reach = -1
    even_reach = -1
    if (H % 2 == 1) :
        odd_reach = (H // 2 + 1)
        even_reach = (H // 2 )
    else :
        odd_reach = (H // 2)
        even_reach = (H // 2)

    
    reachable = 0
    if (W % 2 == 1) :
        odd_row = (W // 2) + 1
        even_row = (W // 2)
        reachable = odd_reach * odd_row
        reachable += even_reach * even_row
    else :
        odd_row = (W // 2) 
        even_row = (W // 2) 
        reachable = odd_reach * odd_row
        reachable += even_reach * even_row

    
    print(reachable)


main()

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

ans = 0

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

Solution (Python):
import math
h,w=[int(x) for x in input().split()]
if h==1 or w==1: print(1)
else: print(int(math.ceil((h*w)/2)))

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

Solution (Python):
import math

H, W = [int(n) for n in input().split()]
if W == 1 or H == 1:
    print(1)
    exit()
if H%2==0:
    print(math.floor(H/2)*W)
else:
    print(math.floor(H/2)*W+math.ceil(W/2))

Solution (Python):
H, W = [int (x) for x in input().split()]

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

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

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

Solution (Python):
from math import ceil
HW = input()
H, W = int(HW.split()[0]), int(HW.split()[1])


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

Solution (Python):
def main():
    

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


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

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

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

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

HH = H // 2
hh = H % 2
WW = W // 2
ww = W % 2

a = 0

a += HH * WW * 2
a += hh * WW
a += HH * ww
a += hh * ww

print(a)

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):
r,c = map(int,input().split())

if r==1 or c == 1:
    print(1)
elif (r%2==1 and c%2==1):
    print(r*c//2+1)
else:
    print(r*c//2)

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

q_h,mod_h = divmod(h,2)

if h == 1 or w == 1:
	print(1)
elif mod_h == 0: 	
	print(w * q_h)
else:
	q_w,mod_w = divmod(w,2)
	if mod_w == 0:
		print(w * q_h + q_w)
	else:
		print(w * q_h + q_w + 1)

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

Solution (Python):

N , M = (map(int , input().split()))
a = N*M
ans = -(-a//2)
if N == 1 or M == 1:
    print(1)
else:
    print(ans)

Solution (Python):
import sys
import numpy as np
import heapq


def input():
    return sys.stdin.readline()[:-1]


def solve():
    H,W = map(int, input().split())
    c = W//2
    if H==1 or W==1:
        print(1)
        exit()
    if W%2==0:
        if H%2==0:
            ans = (H//2)*2*c
        else:
            ans = (H//2)*c + (H//2+1)*c
    else:
        if H%2==0:
            ans = (H//2)*(2*c+1)
        else:
            ans = (H//2)*c + (H//2+1)*(c+1)
    print(int(ans))


if __name__ == "__main__":
    solve()

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

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

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

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

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

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):
import math
input = input().split(" ")
h = int(input[0])
w = int(input[1])
if h != 1:
  if w != 1:
    mult = h*w
    res = math.ceil(mult / 2)
    print(res)
  else:
    print(1)
else:
  print(1)