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

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

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

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):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H,W = map(int,read().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)
elif h % 2 == 0 or 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")
elif a%2==0:
  print(a//2)
else:
  print((a+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:
    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))

Solution (Python):
def main():
    H, W = (int(i) for i in input().split())
    if H == 1 or W == 1:
        return print(1)
    li = (W+1)//2
    ro = ((H+1)//2)
    print(li*ro + (W//2)*(H//2))


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

odd_c = int(math.ceil(W / 2))
even_c = W // 2

odd_r = int(math.ceil(H / 2))
even_r = H // 2

print(odd_c * odd_r + even_c * even_r)

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

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

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(H: int, W: int):
    if H == 1 or W == 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)
    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")
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())

masu = h * w

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

Solution (Python):
h, w = (int(x) for x in input().split())
if h == 1:
    ans = 1
elif w == 1:
    ans = 1
else:
    ans = h*w >> 1
    if (h*w) % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
H, W = [int(i) for i in 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
from collections import deque
def main():
    
    h,w = tuple([int(t)for t in input().split()])

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


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
def solve(h, w):
    if h == 1 or w == 1:
        return 1
    return (h * w + 1) // 2


def main():
    h, w = map(int, input().split())
    res = solve(h, w)
    print(res)


def test():
    assert solve(4, 5) == 10
    assert solve(7, 3) == 11
    assert solve(1000000000, 1000000000) == 500000000000000000


if __name__ == "__main__":
    test()
    main()

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

Solution (Python):
import numpy as np
import collections
import math

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


answer=0

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

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


print(answer)

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

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

res = 0

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

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

hw=h*w
if h==1 or w==1:
    print(1)

elif hw%2==1:
    print(hw//2+1)
else:
    print(hw//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):
def main():
    import sys
    input = sys.stdin.readline
    H, W = map(int, input().split())

    m = H*W // 2 + (H*W) % 2

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

result=(h-h//2)*(w-w//2)+(h//2)*(w//2)
print(result)

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

h,w = get_nums_l()

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

ans = 0

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

print(ans)

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

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

if H % 2 == 0:
    t = H // 2
    u = H // 2
else:
    t = H // 2 + 1
    u = H // 2

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

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


if h == 1 or w == 1:
    print(1)
    exit()
def ceil(a, b):
   return a // b + (a % b > 0)

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

print(ans)

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











mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

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

if __name__=='__main__':
    main()

Solution (Python):
def div_ceil(x, y): return (x + y - 1) // y

H, W = map(int, input().split())
ans = div_ceil(W, 2) * div_ceil(H, 2) + (W // 2) * (H // 2)
print(ans if H != 1 and W != 1 else 1)

Solution (Python):
import bisect
import collections
import sys

sys.setrecursionlimit(100000)
input = sys.stdin.readline
ACMOD = 1000000007
INF = 1 << 32


def lmi():
    return list(map(int, input().split()))


def llmi(n):
    return [lmi() for _ in range(n)]


H, W = lmi()
if H == 1 or W==1:
    print(1)
    exit()
movable = (H*W+1)//2
print(movable)

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

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

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	H,W = inputMap()

	ans = H*W

	if min(H,W) == 1:
		print(1)
	else:
		print(-(-ans // 2))









def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):
import bisect

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

DIV = (10**9) + 7


def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def ncr(n, r, mod=DIV):
	r = min(r, n-r)
	ret = 1
	for i in range(1, r+1):
		ret = ret * (n-i+1) % mod
		ret = ret * mod_inv(i, mod) % mod
	return ret


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % mod) % mod
    return CONV()


def main():
    H,W = isRaw()
    if W==1 or H==1:
        return 1
    return (H*W+1)//2


if __name__ == "__main__":
    print(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 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)
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)
elif (H*W)%2 == 1:
    print(H*W//2+1)
else:
    print(H*W//2)

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

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

if h == 1:
    print(1)
elif 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:
    print(1)
elif 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)
    exit()

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

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

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

D = H * W

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

if D % 2:
    print(D//2+1)
else:
    print(D//2)

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

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

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

Solution (Python):
H,W = map(int,input().split())
h,w = H//2, W//2
h1, w1 = h, w
if H & 1:
    h += 1

if W & 1:
    w += 1

if H == 1:
    print(1)
elif W == 1:
    print(1)
else:
    print(w * h + w1 * h1)

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):
n,m=map(int,input().split())
if n==1 or m==1:
    print(1)
else:
    print(-((-n*m)//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):
import sys, bisect, math, itertools, string, queue, copy


from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])
 
def main():
    h,w = inpm()
    if h==1 or w==1:
        print(1)
        return
    if h*w %2 == 0:
        print(h*w//2)
    else:
        print(h*(w-1)//2+(h+1)//2)
 
if __name__ == "__main__":
    main()

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	H,W = inputMap()

	ans = H*W

	if min(H,W) == 1:
		print(1)
	else:
		print(-(-ans // 2))









def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

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

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

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

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

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 sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    h,w=MI()
    if h==1 or w==1:print(1)
    else:print((h*w+1)//2)

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

if w == 1:
    print(1)
elif h == 1:
    print(1)
else:
    a = (w+1)//2
    b = w//2

    print(h//2 * (a+b) + (h%2) * a)

Solution (Python):
import math

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

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

    if h % 2 == 1:
        ans += math.ceil(w/2)

    print(ans)

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

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

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

h, w = MAP()
ans = h * w // 2
if h % 2 == 1 and w % 2 == 1:
    ans += 1
if h == 1 or w == 1:
    ans = 1
print(ans)

Solution (Python):
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    H,W=MI()
    if H==1 or W==1:
        print(1)
    else:
        print((H*W+1)//2)

main()

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from fractions import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

def main():
    H,W=mis()
    if H==1 or W==1:
        print(1)
        return
    od = math.ceil(W/2)
    ev = W//2
    ans = (od+ev) * (H//2)
    if H&1:
        ans += od
    print(ans)



main()

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(0--(h*w)//2)

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

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

print(ans)

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

Solution (Python):
import sys







def main():
    print(solve())


def solve():
    h, w = map(int, input().split())

    if h == 1 or w == 1:
        return 1

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


if __name__ == '__main__':
    main()

Solution (Python):
import math
H,W= list(map(int,input().split(" ")))
mul = H * W
ans = mul//2
if H == 1 or W == 1:
    ans = 1
elif mul % 2 == 1:
    ans +=1
print(ans)

Solution (Python):
if __name__ == '__main__':
    h, w = tuple([int(n) for n in input().split()])

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

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

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

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

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

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 + 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):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

H,W = m()

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

po = W * (H // 2)
if H % 2 == 1:
    po += -(-W//2)
print(po)

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

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

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

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

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

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

Solution (Python):
h, w = list(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//2+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 // 2 + 1)

Solution (Python):
from sys import stdin,setrecursionlimit
import math
setrecursionlimit(10**7)
h,w = map(int,stdin.readline().rstrip().split())
if h == 1 or w == 1:
    print(1)
    exit()
print(math.ceil(h*w/2))

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

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

Solution (Python):
H, W = input().split()[0:2]
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):
h,w = map(int, input().split())

hw=h*w

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

Solution (Python):






import sys



ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    h, w = list(map(int, ipti().split()))
    ans = 0
    ans += ((w + 1) // 2) * ((h + 1) // 2)
    ans += (w // 2) * (h // 2)

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

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
R, C = map(int, input().split())

if R == 1 or C == 1:
  print(1)
  raise SystemExit

first = C // 2 if C % 2 == 0 else C // 2 + 1
second = C - first

if R % 2 == 0:
  print(C * (R // 2))
else:
  print(C * (R // 2) + first)

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

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

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

print(ans)