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

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

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

if H == 1 or W == 1:
    print(1)
else:
    q,r = divmod(H*W, 2)
    print(q+r)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

al = H * W

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

print(ans)

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

if (H - 1) * (W - 1) == 0:
    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()

q, r = divmod(h, 2)
q2, r2 = divmod(w, 2)

ans = (q + r) * (q2 + r2) + q * q2
print(ans)

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(H, W):
    if min(H, W) == 1:
        return 1
    return -(-(H*W)//2)


def main():
    H, W = read_int_n()
    print(slv(H, W))


if __name__ == '__main__':
    main()

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

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

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):
import sys
range = xrange
input = raw_input

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

if h == 1 or w == 1:
    print 1
else:
    hup = h + 1 >> 1
    hdown = h >> 1
    wup = w + 1 >> 1
    wdown = w >> 1
    print hup*wup + hdown*wdown

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 = [int(i) for i in input().split()]
if H == 1 or W == 1:
    print(1)
else:
    if H%2 == 1 and W%2 == 1:
        print(H*W//2+1)
    else:
        print((H*W)//2)

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, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, W = MAP()
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):

MOD = 10 ** 9 + 7
INFI = 10**10

import math

import itertools



import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default






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

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:
  print(1)
elif 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 + 1) // 2)

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):
def main():
    import sys
    import math
    H,W=list(map(int,sys.stdin.readline().split()))
    
    if H==1 or W==1:
        return 1

    return math.ceil(H*W/2)

print(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):
a, b = map(int, input().split())
if 1 in [a, b]:
  print(1)
  exit()
print((a*b+1)//2)

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read


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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    h,w = LI()
    if min(h,w) == 1:
        print(1)
        return 
    k = w>>1
    ans = (h>>1)*k+(h-(h>>1))*(k+(w&1))
    print(ans)
    return


if __name__ == "__main__":
    solve()

Solution (Python):
from math import ceil

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

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

print(int(ceil(h*w/2)))

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

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

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

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

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

a,b=MAP()
if a==1 or b==1:
    print(1)
    exit()
n=a*b
if n%2==0:
    print(n//2)
else:
    print(n//2+1)

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 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:
	if H * 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)
  exit()

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

print(t)

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

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

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

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

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

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