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

ans = (w // 2 + w % 2) * (h // 2 + h % 2) + (w // 2) * (h // 2)

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(100000)

def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int, ins()))
def lin(): return list(input())
def iin(): return map(int, ins())

h,w = iin()
if h==1 or w==1:
    res = 1
else:
    s1 = (h+1)//2
    s2 = h//2
    if w%2==0:
        res = s1 * (w//2) + s2 * (w//2)
    else:
        res = s1 * (w // 2 + 1) + s2 * (w // 2)
print(res)

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

if h==1 or w==1:
    print(1)
elif h%2 and 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:
    print("1")
    exit()

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

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

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

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

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

A = (H * W + 1) // 2

if H == 1 or W == 1:
    A = 1

print(A)

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

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

a=max(h)
b=min(h)
ans=0
if a%2==0:
    ans=a*b/2
else:
    ans+=(a-1)*b/2
    ans+=(b+1)//2

if b==1:ans=1
print(int(ans))

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n, m = map(int, input().split())

if n == 1 or m == 1:
    print(1)
else:
    print( - (-n*m//2)  )

Solution (Python):
import sys

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


A = H*W

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

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

Solution (Python):
h,w=map(int,input().split())
if h==1 or w==1:
    print(1)
    exit()
if h%2==1 and w%2==1:
    print((h*w+1)//2)
else:
    print(h*w//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):
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left 

enu = enumerate

sys.setrecursionlimit(10**7)
H, W = map(int, input().split())

al = H*W // 2

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

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

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






































































































































































class manacher:

    def __init__(self, l):
        self.n = len(l)
        self.m = 2*self.n+1
        self.d = ['&']*self.m
        self.r = [0]*self.m
        for i in range(self.n):
            self.d[2*i+1] = l[i]
        self.make_r()

    def make_r(self):
        i, j = 0, 0
        while i < self.m:
            while j <= i < self.m-j and self.d[i-j] == self.d[i+j]:
                j += 1
            self.r[i] = j
            k = 1
            while k <= i < self.m-k and k+self.r[i-k] < j:
                self.r[i+k] = self.r[i-k]
                k += 1
            i += k
            j -= k

    def judge(self, start, end):
        center = start+end
        return 2 * end - 1 < center + self.r[center]


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


if __name__ == '__main__':
    main()

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

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

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

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

ans = H * W
if H == 1 or W == 1:
    print(1)
elif ans % 2 == 1:
    print(ans // 2 + 1)
else:
    print(ans // 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 copy
import random
import bisect 
import fractions 
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

H, W = LI()

ans = 0

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

print(ans)

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

Solution (Python):



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

h,w = input_multiple_number()

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

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

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

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

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

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

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

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

if w == 1 or h == 1:
    print(1)
else:
    print(math.ceil(w*h/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 * w // 2 + 1)

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

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

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

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

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

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

if __name__ == "__main__":
    main()

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

Solution (Python):

import sys


def solve(H: int, W: int):
    if H > 1 and W > 1:
        print(W // 2 * H + (H // 2 + H % 2) * (W % 2))
    else:
        print(1)



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 sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

h,w = na()

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

print((h*w+1)//2)

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

Solution (Python):
a,b = map(int,input().split())

if a==1 or b==1:
    print(1)
else:
    print((a*b+1)//2)

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import os
import sys

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


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

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

h1 = (H + 1) // 2
h2 = H // 2
w1 = (W + 1) // 2
w2 = W // 2
ans = h1 * w1 + h2 * w2
print(ans)

Solution (Python):
import sys
import math
h, w = map(int, sys.stdin.readline().split())

ans = math.ceil(h*w/2) if h != 1 and w != 1 else 1
print(ans)

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    H, W = LI()
    if H == 1 or W == 1:
        print(1)
        return
    if H * W % 2 > 0:
        cnt = (H * W + 1) // 2
    else:
        cnt = H*W//2
    print(cnt)

main()

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

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


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


def read_index():
    return map(lambda x: x - 1, map(int, input().split()))


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def functional(N, mod):
    F = [1] * (N + 1)
    for i in range(N):
        F[i + 1] = (i + 1) * F[i] % mod
    return F


def main():
    H, W = read_values()
    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())

c1 = (h + 1) // 2
c2 = h - c1

w1 = (w + 1) // 2
w2 = w - w1
if h == 1 or w == 1:
  print(1)
else:
  print(c1 * w1 + c2 * w2)

Solution (Python):
a,b = map(int,input().split())

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

res = b * (a // 2)
if a % 2 == 1:
    res += (b + 1) // 2
print(res)

Solution (Python):
"""
Author    : co_devil Chirag Garg
Institute : JIIT
"""
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *



from fractions import Fraction
mod = int(pow(10, 9)+7)


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


def si(): return str(input())


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


def li(): return list(mi())


def fii(): return int(stdin.readline())


def fsi(): return str(stdin.readline())


def fmi(): return map(int, stdin.readline().split())


def fli(): return list(fmi())


abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12,
       'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24,
       'z': 25}


def getKey(item): return item[0]


def sort2(l): return sorted(l, key=getKey)


def d2(n, m, num): return [[num for x in range(m)] for y in range(n)]


def isPowerOfTwo(x): return (x and (not (x & (x - 1))))


def decimalToBinary(n): return bin(n).replace("0b", "")


def ntl(n): return [int(i) for i in str(n)]


def powerMod(x, y, p):
    res = 1
    x %= p
    while y > 0:
        if y & 1:
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res


graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000


def bfs(d, v):
    q = []
    q.append(v)
    visited[v] = 1
    while len(q) != 0:
        x = q[0]
        q.pop(0)
        for i in d[x]:
            if visited[i] != 1:
                visited[i] = 1
                q.append(i)
        print(x)


def make_graph(e):
    d = {}
    for i in range(e):
        x, y = mi()
        if x not in d:
            d[x] = [y]
        else:
            d[x].append(y)
        if y not in d:
            d[y] = [x]
        else:
            d[y].append(x)
    return d


def gr2(n):
    d = defaultdict(list)
    for i in range(n):
        x, y = mi()
        d[x].append(y)
    return d


def connected_components(graph):
    seen = set()

    def dfs(v):
        vs = set([v])
        component = []
        while vs:
            v = vs.pop()
            seen.add(v)
            vs |= set(graph[v]) - seen
            component.append(v)
        return component

    ans = []
    for v in graph:
        if v not in seen:
            d = dfs(v)
            ans.append(d)
    return ans


def primeFactors(n):
    s = set()
    while n % 2 == 0:
        s.add(2)
        n = n // 2
    for i in range(3, int(sqrt(n)) + 1, 2):
        while n % i == 0:
            s.add(i)
            n = n // i
    if n > 2:
        s.add(n)
    return s


def find_all(a_str, sub):
    start = 0
    while True:
        start = a_str.find(sub, start)
        if start == -1:
            return
        yield start
        start += len(sub)


def SieveOfEratosthenes(n, isPrime):
    isPrime[0] = isPrime[1] = False
    for i in range(2, n):
        isPrime[i] = True
    p = 2
    while (p * p <= n):
        if (isPrime[p] == True):
            i = p * p
            while (i <= n):
                isPrime[i] = False
                i += p
        p += 1
    return isPrime


def dijkstra(edges, f, t):
    g = defaultdict(list)
    for l, r, c in edges:
        g[l].append((c, r))

    q, seen, mins = [(0, f, ())], set(), {f: 0}
    while q:
        (cost, v1, path) = heappop(q)
        if v1 not in seen:
            seen.add(v1)
            path = (v1, path)
            if v1 == t:
                return (cost, path)

            for c, v2 in g.get(v1, ()):
                if v2 in seen:
                    continue
                prev = mins.get(v2, None)
                next = cost + c
                if prev is None or next < prev:
                    mins[v2] = next
                    heappush(q, (next, v2, path))
    return float("inf")


def binsearch(a, l, r, x):
    while l <= r:
        mid = l + (r-1)//2
        if a[mid]:
            return mid
        elif a[mid] > x:
            l = mid-1
        else:
            r = mid+1
    return -1


def dfs(d, v):
    q = []
    q.insert(0, v)
    visited[v] = 1
    while len(q) != 0:
        x = q[0]
        q.pop(0)
        for i in d[x]:
            if visited[i] != 1:
                visited[i] = 1
                q.insert(0, i)
        print(x)


n, m = mi()

if n == 1 or m == 1:
    print(1)
else:
    print(int(ceil(n*m/2)))

Solution (Python):
a,b = map(int,input().split())
mid = a * b - a * b // 2 
if a == 1 or b == 1:
	print(1)
	exit()
print(mid)

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

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


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

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

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

Solution (Python):
h,w = map(int,input().split())
ans = 0
a1 = -(-w//2)

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

Solution (Python):

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

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

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

Solution (Python):
[h, w] = input().split()

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

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

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

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

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+1)//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):
def main():
    H, W = list(map(int, input().split()))
    if min(H, W) == 1:
        return 1

    return (H * W + 1) // 2


print(main())

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

Solution (Python):
h, w = list(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):
from math import ceil
h, w = map(int, input().split())
if min(h,w) <= 1:
    print(1)
    exit()

print(ceil(h * w / 2))

Solution (Python):
h, w = list(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=[int(j) for j in 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*w+1)//2)

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

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

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

    print(ans)


if __name__ == '__main__':
    main()

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

if H==1 and W==1:
    print('1')
elif 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%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:
    print(1)
    exit()
print((h*w+1)//2)

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

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

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

Solution (Python):
def examA():
    L = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    K = I()

    ans = L[K-1]
    print(ans)
    return

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

def examC():
    a,b,c = LI()
    if c-(a+b)<=0:
        print("No")
        return
    judge = (c-a-b)**2-4*a*b
    if judge>0:
        print("Yes")
    else:
        print("No")
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**6)

if __name__ == '__main__':
    examB()

"""

"""

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

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
import queue
import copy
import bisect
import heapq


def dfs(s, prev, pre):
  val[s] += Ope[s] + prev
  for i in G[s]:
    if(i == pre):
      continue
    dfs(i, val[s], s)

def bfs(sx, sy, n):
  que = deque([[sy,sx]])
  while que:
    y,x = que.popleft()
    for i,j in D:
      if(x+i<0 or y+j<0 or x+i>W-1 or y+j>H-1):
        continue
      dist = G[y+j][x+i]
      if(G[y+j][x+i] != "X"):
        if(type(G[y+j][x+i]) is str):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        elif(dist>G[y][x]+1):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        









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

ans = H*W

if(ans%2==0):
  ans = ans/2
else:
  ans = math.ceil(ans/2)

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

print(int(ans))

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

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

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

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

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

Solution (Python):
import sys
import math
import copy
import queue
input = sys.stdin.readline
def LI(): return [int(x) for x in input().split()]

H,W = LI()

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

Solution (Python):
w, h = map(int, input().split())
ans = w * h  // 2

if w * h % 2 == 1 : ans += 1

if w == 1 or h == 1:
    ans = 1

print(ans)

Solution (Python):




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


if __name__ == "__main__":
    main()

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

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

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

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

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

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

m=h//2
ans=0

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

num=w//2
ans+=num*h
if w%2==1:
  ans+=h-m
'''
for i in range(w):
  if i%2==0:
    ans+=h-m
  else:
    ans+=m
'''
print(ans)

Solution (Python):
import math
H, W = [int(i) for i in input().split()]
print(math.ceil(H/2)*math.ceil(W/2)+(H//2)*(W//2) if H > 1 and W > 1 else 1)

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

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

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