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

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

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

if x==1 or y==1:
  print(1)
else:
  print((x*y+1)//2)

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

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

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

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

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

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

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

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

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

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

if h == 1 or m == 1:
    count = 1
else:
    count = ((h //2) * m) + ((h %2) *((m //2) + (m %2)))
print(count)

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

Solution (Python):
from math import ceil
from sys import stdin
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
if H == 1 or W == 1:
    print(1)
else:
    print(ceil(H*W/2))

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

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

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

    print(ans)

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

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

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 = map(int,input().split())
if w < h:
  h,w = w,h
if h==1:
  print(1)
else:
  ans = math.ceil((h*w)/2)
  print(max(1,ans))

Solution (Python):



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

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

Solution (Python):

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

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

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

if h==1 or w==1:
    print(1);exit()
tmp = (h*w)//2+(h*w)%2
print(tmp)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


H, W = MAP()
if H == 1 or W == 1:
	print(1)
else:
	print(-(-H*W//2))

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

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

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

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

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

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

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

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

if h == 1 or w == 1:
  print(1)
else:
  if h % 2 == 1 and w % 2 == 1:
    t = t + 1
  print(int(t/2))

Solution (Python):
h,w=map(int,input().split())
print([1,sum(divmod(h*w, 2))][h>1<w])

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

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

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





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

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

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

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

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

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

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

if((H != 1)and(W != 1)):
  cnt1 = ((H+1)//2)*((W+1)//2)
  cnt2 = (H//2)*(W//2)
  ans = cnt1 + cnt2
else:
  ans = 1
  
print(ans)

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

Solution (Python):
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 == 1 or W == 1:
    print(1)

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

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

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

Solution (Python):
il = [int(k) for k in input().split()]

H = il[0]
W = il[1]



import math

a = math.ceil(W/2)
b = math.floor(W/2)
c = math.ceil(H/2)
d = math.floor(H/2)

if H == 1 or W == 1:
    print("1")
else:
    print(a*c + b*d)

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

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

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):
import sys
import math
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
H,W= LI()

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

Solution (Python):

import sys
import math


def solve(H: int, W: int):
    if W == 1 or H == 1:
        
        print(1)
    else:
        print(math.ceil(W * H / 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())
if h==1 or w==1:
  print(1)
else:
  ans=(h*w)//2
  if h*w%2==1:
    print(ans+1)
  else:
    print(ans)

Solution (Python):

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

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

Solution (Python):
from math import ceil

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

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

Solution (Python):
from sys import stdin

h, w = [int(x) for x in stdin.readline().strip().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())
if H==1 or W==1:
  print(1)
  exit()
if H*W%2==0:
  ans=int(H*W/2)
else:
  ans=int(H*W//2)+1
print(ans)

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

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

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

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

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

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

w1=0--W//2
w2=W//2

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

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

if h !=1 and w != 1:
    print((h*w+1)//2)
else:
    print(1)

Solution (Python):
n,m = map(int,input().split())



def fun():
    if int(m/2) == m/2:
        ans = n*m/2
    else:
        if int(n/2)==n/2:
            ans = n*m/2
        else:
            ans = (n*m/2)+0.5
    
    print(int(ans))  
    
if n == 1 or m ==1:
    print("1")
else:
    fun()

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

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

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

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

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

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):

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


h, w = invr()

c = (int((h+1)/2)*w)
if h % 2 != 0:
    c = c - (w-1)/2
if h == 1 or w == 1:
    c = 1
print(int(c))

Solution (Python):
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

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

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

h1 = H//2
h2 = H-h1

w2 = W//2
w1 = W-w2

if H==1 or W==1:
  print(1)
else:
  print(h2*w1+h1*w2)

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

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

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

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

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

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

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

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

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

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

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

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

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

hh = h%2
kk = k%2

if h == 1 or k == 1:
    ans = 1
elif hh == 0 or kk == 0:
    ans = int(h*k/2)
else:
    ans = int(h*k/2)+1

print(ans)

Solution (Python):
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(int(x/2*y))
  exit(0)
a=int(x*y/2)+1
print(a)

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

if H==1 or W==1:
  ans = 1
else:
  ans = math.ceil(H/2)*math.ceil(W/2) + math.floor(H/2)*math.floor(W/2)

print(ans)

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

if __name__ == '__main__':
    main()

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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


if __name__ == '__main__':
    main()

Solution (Python):



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

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

s = 0

if h == 1 or w == 1:
    s = 1
else:
    s = h*w//2 + h*w % 2

print(s)

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0
h,w = map(int,input().split())
neko = h%2
nya = w%2
nuko = h * w /2
if neko + nya == 2:
    nuko = nuko + 1
if (h == 1)or(w == 1):
    nuko = 1
print(int(nuko))

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

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

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

if H > W:
    H,W = W,H

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

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

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

Solution (Python):

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

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

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

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

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

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

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

ans = 0 

ans += H//2*W

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

Solution (Python):
import math

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

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

Solution (Python):
h,w = map(int, raw_input().split(' '))
def f(h,w): return 1 if h == 1 or w == 1 else (h - (h/2)) * ((w - w/2)) + ((h/2)) * (w/2)
print f(h,w)

Solution (Python):
h,w = map(int, raw_input().split(' '))
def f(h,w):
	if h == 1 or w == 1:
		return 1
	x = w - w/2
	y = w/2
	count = 0
	count += (h - (h/2)) * x
	count += ((h/2)) * y
	return count
		


print f(h,w)

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

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

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

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

if H > 1 and W > 1:
	num = 2 * w1 * h1 + w2 * h1 + w1 * h2 + w2 * h2 
else:
  num = 1
print(num)

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):
import math
h , w = map(int , input().strip().split())
if h != 1 and w != 1:
  print(math.ceil(h * w / 2))
else:
  print(1)

Solution (Python):
import math

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

Solution (Python):
def resolve():
    from math import ceil
    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(ceil(h * w / 2)))


resolve()

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

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

if (H*W) % 2 == 0:
  if H == 1 or W == 1:
    res = 1
  else:
    res = int(H * W / 2)
else:
  if H == 1 or W == 1:
    res = 1
  else:
    res =  int(H * (W//2) + int(H/2) + 1)
print('{0:d}'.format(res))

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

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

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

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

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

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

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

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

print(ans)

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

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

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

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



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

Solution (Python):


import math


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


if H==1 or W==1:
    print(1)
else:
    ans = math.ceil(H * W / 2)
    print(ans)

Solution (Python):
import numpy as np

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

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

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

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

print(ans)

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
a, b = (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))

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



import math

def get_num_of_reachable(H, W):
    if H == 1 or W == 1: return 1
    else: return math.ceil((H*W)/2)

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

if __name__ == "__main__":
    try:
        assert get_num_of_reachable(4, 5) == 10
        assert get_num_of_reachable(7, 3) == 11
        assert get_num_of_reachable(1000000000, 1000000000) == 500000000000000000
    except:
        import traceback
        traceback.print_exc()
        exit()
    main()

Solution (Python):
H,W=[int(i) for i in input().split()]
if H==1 or W==1:
    print(1)
else:
    print(int(H*W/2)+(H*W)%2)

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

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

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

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

    elif (h*w) % 2 == 0:
        print(resp)

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

sum = float(H*W)
if sum%2 == 0:
    if H == 1 or W == 1:
        print(1)
    else:
        print(H*W//2)
else:
    if H == 1 or W == 1:
        print(1)
    else:
        print(math.floor(H*W/2)+1)

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

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

tmp = H * W

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

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

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

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

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

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

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

print(move_count)

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

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


def read():
    H, W = map(int, input().strip().split())
    return H, W

def solve(H, W):
    if H == 1 or W == 1:
        return 1
    n = H * W
    return n // 2 + n % 2

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

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

masu_sum = H * W

if H == 1 or W == 1:
    ans = 1
elif masu_sum % 2 == 0:
    ans = masu_sum // 2
else:
    ans = masu_sum // 2 + 1

print(ans)

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

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

print(ans)

Solution (Python):
N, M = map(int, input().split())

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

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

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

Solution (Python):
line = input()
data = line.split()
 
height = int(data[0])
wei = int(data[1])

if height !=1 and wei !=1: 
  if height %2 ==0:
    if wei %2 ==0:
      print(int(wei/2)*height)
    else:
      print(int(wei/2)*height+int(height/2))
  else:
    if wei %2 ==0:
      print(int(height/2)* wei + int(wei/2))
    else:
      print(wei* int(height/2) + int(wei/2)+1)
else:
  print(1)