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



Sample input:
4 5


Sample output:
10

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
h, w = map(int, input().split())
print((h * w + 1) // 2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print(-(-(h * w) // 2))

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split(' '))
print((n*m+1)//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import collections
from collections import deque
#k = int(input())
h, w = map(int, sys.stdin.readline().split())
#s = input()
#x = sys.stdin.readline().split()

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

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
print(math.ceil(a*b /2))

Submission status: Wrong Answer

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







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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H,W =map(int,input().split())
print((H*W+1)//2)

Submission status: Wrong Answer

Solution code:
from math import ceil
h, w = map(int, input().split())
print(ceil(h * w / 2))

Submission status: Wrong Answer

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

h,w=mi()

ans=-(-(h*w)//2)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
print(abs(-(H*W)//2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = math.ceil(H/2) * math.ceil(W/2) + (H // 2)*(W//2)
print(ans)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
print(H*W//2 + (H*W%2))

Submission status: Wrong Answer

Solution code:
#I=int(input())
#S=str(input())
#N,M=map(int, input().split())
#L=list(map(int, input().split()))
H,W=map(int, input().split())
print(H*W//2 if (H*W)%2==0 else H*W//2+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np

n,w = map(int, input().split())
# n = int(input())
# p = list(map(int, input().split()))

if n * w % 2 == 0:
    ans = n * w // 2

else:
    ans = n * w // 2 + 1

print(ans)

Submission status: Wrong Answer

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


print(math.ceil(H*W/2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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()
movable = (H*W+1)//2
print(movable)

Submission status: Wrong Answer

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

A = H*W

print(-(-A//2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
print(((h+1)//2)*((w+1)//2))

Submission status: Wrong Answer

Solution code:
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 al % 2 == 0:
    ans = al // 2
else:
    ans = (al + 1) // 2

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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):
    return -(-(H*W)//2)


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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
h,w = map(int, input().split())
area = h*w +1
ans =  area // 2
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil
h, w = map(int, input().split())
print(ceil((h*w)/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil


def main():
    h, w = map(int, input().split())
    print(w * (h // 2) + ceil(w / 2) * (h % 2))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

H,W = input_int()

print(int(H*W/2 +0.5))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
print((A * B + 1) // 2)

Submission status: Wrong Answer

Solution code:
from math import ceil, floor

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

print(ceil(h / 2) * ceil(w / 2) + floor(h / 2) * floor(w / 2))

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
x=h*w
print((x-1)//2+1)

Submission status: Wrong Answer

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

    return (H * W + 1) // 2


print(main())

Submission status: Wrong Answer

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

def ceil(a, b):
   return a // b + (a % b > 0)

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
# input = sys.stdin.readline
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*w %2 == 0:
        print(h*w//2)
    else:
        print(h*(w-1)//2+(h+1)//2)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
print(-(-n*m//2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Sat Mar 14 12:02:25 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

from math import ceil

H, W = na()
print(ceil(H * W / 2))

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
import numpy as np
import fractions

a,b=map(int, input().split())
print((a*b)//2+((a*b)%2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = h * w

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
import math
print(math.ceil((m*n)/2))

Submission status: Wrong Answer

Solution code:
import sys, re
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,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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

def main():
	h, w = MAP()
	print(ceil(h * w / 2))

if __name__=='__main__':
	main()

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
print((H * W + 1) // 2)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
print(h*(w//2)+(h//2+h%2)*(w%2))

Submission status: Wrong Answer

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

    ans = H*W//2 + (H*W)%2
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    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()

"""

"""

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
print(-(-h*w//2))

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline

    h, w = map(int, input().split())
    print((h*w+1)//2)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = h*w
print(x/2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    h, w = rli()
    ans = (h*w)//2
    if (h*w%2 == 1): ans += 1
    print(ans)



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w=list(map(int, input().split()))
print((h*w)//2+(int((h*w)%2!=0)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
from math import ceil
H, W = map(int, input().split())
print(ceil(H * W / 2))

Submission status: Wrong Answer

Solution code:
def resolve():
    h,w = map(int, input().split())
    print((h * w + 1) // 2)
    

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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
print(ans)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print(h * w // 2 + (h * w) % 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, W = list(map(int, input().split()))
print(int(H*W/2) + H*W%2)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    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): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    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()

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

Submission status: Wrong Answer

Solution code:
# import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
# import collections # queue
# from fractions import Fraction

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

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

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w = map(int, input().split())
print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
n, m = list(map(int, input().split()))
print((n * m) // 2)

Submission status: Wrong Answer

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

n = a*b

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
print((a*b+1)//2)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
import sys
sys.setrecursionlimit(10000000)

#const
# my functions here!
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    H,W=pin()
    print((H*W+1)//2)
"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """4 5"""
        output = """10"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """7 3"""
        output = """11"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """1000000000 1000000000"""
        output = """500000000000000000"""
        self.assertIO(input, output)
if __name__=="__main__":resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys


def solve(H: int, W: int):
    if (H*W)%2 == 0:
        print(H*W//2)
    else:
        print(H*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))  # type: int
    W = int(next(tokens))  # type: int
    solve(H, W)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
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()
n=a*b
if n%2==0:
    print(n//2)
else:
    print(n//2+1)

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=n*m
print(-(-a//2))

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

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

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
print((H+1)//2*((W+1)//2)+(H)//2*((W)//2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

print(ceil(H * W / 2))

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gamma, log
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

h, w = LI()
print((h * w + 1) // 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split());print((h*w+1)//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = -((-H * W) // 2)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil
H, W = map(int, input().split())
print(ceil(H*W/2))

Submission status: Wrong Answer

Solution code:
h, w = list(map(int, input().split()))
print((h*w+1) // 2)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
ans = (W//2 + W%2)*H//2 + W//2*(H//2+H%2)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
total = H * W
ans = (total + 1) // 2

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
H, W = map(int, input().split())
print(-(-(H * W) // 2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
print(H*W-H*W//2)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print(-(-(h * w )// 2))

Submission status: Wrong Answer

Solution code:
H,W = [int(i) for i in input().split()]
N = H*W
if N % 2 == 1:
    N-=1
    print(N//2)
    exit()
if N%2 ==0:
    print(N//2)

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
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()
    k = w>>1
    ans = (h>>1)*k+(h-(h>>1))*(k+(w&1))
    print(ans)
    return

#Solve
if __name__ == "__main__":
    solve()