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

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

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
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

import math

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

print(ans)

Submission status: Wrong Answer

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

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:
import math
H,W = map(int,input().split())
print(math.ceil(H*W/2))

Submission status: Wrong Answer

Solution code:
import math

h, w = map(int, input().split(' '))
k = math.ceil(h * w / 2)
print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  h, w = map(int, open(0).read().split())
  
  if h == 1 or w == 1:
    print(int(1))
  else:
    print(int(((h+w)+1)/2))
  
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

h = H%2
w = W%2

if h!=0:
    if w !=0:
        print((2*(H//2)+1)*(W//2) + H//2+1)
    else:
        print((2*(H//2)+1)*(W//2))

elif h==0:
    if w != 0:
        print((2*(H//2))*(W//2) + H//2)
    else:
        print((2*(H//2))*(W//2))

else:
    print(1)

Submission status: Wrong Answer

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

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

if (h==0 and w == 0):
    print((2*(H//2))*(W//2))

if (h!=0 and w == 0):
    print((2*(H//2)+1)*(W//2))

if (h ==0 and w !=0):
    print((2*(H//2))*(W//2) + H//2)

Submission status: Wrong Answer

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

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

if (h==0 and w == 0):
    print((2*(H//2))*(W//2))

if (h!=0 and w == 0):
    print((2*(H//2)+1)*(W//2))

if (h ==0 and w !=0):
    print((2*(H//2))*(W//2) + H//2+1)

Submission status: Wrong Answer

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

h = H%2
w = W%2

if (h==1 and w ==1):
    print((2*(H//2)+1)*(W//2) + H//2+1)

if (h!=1 and w != 1):
    print((2*(H//2))*(W//2))

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

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

Submission status: Wrong Answer

Solution code:
a, b = (int(x) for x in input().split())

if a == 1 or b == 1:
    print("0")
elif a * b % 2 == 0:
    print(int(a * b / 2))
else:
    print(int((a * b - 1) / 2 + 1))

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

if a==1 or b == 1:
  print("0")
  if a*b%2==0:
    print(int(a*b/2))
  else:
    print(int((a*b-1)/2+1))

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

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

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:
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

import math

def get_num_of_reachable(H, W):
    return math.ceil((H*W)/2)

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

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

Submission status: Wrong Answer

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


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


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

Submission status: Wrong Answer

Solution code:
H,W=[int(i) for i in input().split()]
print(int(H*W/2)+(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())
print((H*W+1)//2)

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split(' ')))

C1 = int((A[0]-1)/2)+1
C1 *= int((A[1]-1)/2)+1
C2 = 0
if A[1] > 1:
  C2 = int((A[0]-1)/2)
  C2 *= int((A[1]-2)/2)+1
print(C1+C2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if (h * w) % 2 != 0:
    resp += 1
    print(resp)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

sum = float(H*W)

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

Submission status: Wrong Answer

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

sum = float(H*W)

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

Submission status: Wrong Answer

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

sum = float(H*W)

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

Submission status: Wrong Answer

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

sum = float(H*W)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
H,W=[7,3]
print(math.ceil(H*W/2))

Submission status: Wrong Answer

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


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

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

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

masu_sum = H * W
if H == 1 | W == 1:
    ans = 1

if masu_sum % 2 == 0:
    ans = masu_sum // 2
else:
    ans = masu_sum // 2 + 1

print(ans)

Submission status: Wrong Answer

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

masu_sum = H * W
if H == 1 | W == 1:
    print(1)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
even_odd = 0
if H % 2 == W % 2 == 1:
    even_odd = 1

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

print(ans)

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//2 + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input()
data = line.split()
 
height = int(data[0])
wei = int(data[1])
 
if height %2 ==0:
    print(int(height/2)*wei)
else:
  if wei %2 ==0:
    print(int(height/2)* wei + int(wei/2))
  else:
    print(wei* int(height/2) + int(wei/2)+1)

Submission status: Wrong Answer

Solution code:
line = input()
data = line.split()
 
height = int(data[0])
wei = int(data[1])
 
if height %2 ==0:
    print(int(height/2)*wei)
else:
  if wei %2 ==0:
    print(int(height/2)* wei + int(wei/2))
  else:
    print(wei* int(height/2) + int(wei/2)+1)

Submission status: Wrong Answer

Solution code:
H, W = [int(n) for n in input().split()]
if H%2 == 0:
    print(H*W//2)
else:
    h = (H+1)//2
    h_ = h-1
    if W%2 == 0:
        print((h+h_)*W//2)
    else:
        print((h+h_)*(W//2) + h)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input()
data = line.split()
 
height = int(data[0])
wei = int(data[1])
 
if height %2 ==0:
  if wei %2 ==0:
    print(int(height/2)*wei)
else:
  if wei %2 ==0:
    print(int(height/2)* wei + int(wei/2))
  else:
    print(wei* int(height/2) + int(wei/2)+1)

Submission status: Wrong Answer

Solution code:
line = input()
data = line.split()

height = int(data[0])
wei = int(data[1])

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

Submission status: Wrong Answer

Solution code:
line = input()
data = line.split()

height = int(data[0])
wei = int(data[1])

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

Submission status: Wrong Answer

Solution code:
line = input()
data = line.split()

height = int(data[0])
wei = int(data[1])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(c)

Submission status: Wrong Answer

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

ra = W // 2
rb = ra + 1

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

Submission status: Wrong Answer

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

ra = W // 2
rb = ra + 1

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

Submission status: Wrong Answer

Solution code:
h, w = (int(x) for x in input().split())
p = h * w
if not p % 2:
    print(int(p / 2))
else:
    print(int(p / 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())
ans=0
if H==1 or W==1:
	ans=1
else:
	if H%2==0:
		ans=H*W//2
	else:
		if W%2!=0:
			ans = H*(W-1)//2+(H//2+1)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y=list(map(int,raw_input().split()))
w=x
h=y
ans=x//2 * (h//2 + (h+1)//2)
if x%2==1:
     ans+=(h+1)//2
print(ans)

Submission status: Wrong Answer

Solution code:
import math
data = input().split(' ')
h = int(data[0])
w = int(data[1])
ans = math.ceil(h/2) * math.ceil(w/2) + math.floor(h/2) * math.floor(w/2)
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
from fractions import gcd
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

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

def readInts():
  return list(map(int,input().split()))
def main():
    # # 到達していないところはFalseにしとこう
    # h,w = readInts()
    # Field = [[0] * w for _ in range(h)]
    # d = deque()
    # # 最初左上にいるらしい
    # # 移動方向 diagonaaaaaaal!
    # dx = [-1,-1,1,1]
    # dy = [-1,1,-1,1]
    # # dfsしたい
    # d.append([0,0]) # 初期値を入れる
    # cnt = 0
    # while d:
    #     x,y = d.pop()
    #     Field[y][x] = 1
    #     #cnt += 1
    #     for i in range(4):
    #         nx = x + dx[i]
    #         ny = y + dy[i]
    #         if nx < 0 or w <= nx or ny < 0 or h <= ny:
    #             continue
    #         if Field[ny][nx] == 0:
    #             continue
    #         # 探索済みならいかない
    #         d.append([nx,ny])
    # for x in range(w):
    #     for y in range(h):
    #         if Field[y][x] == 1:
    #             cnt += 1
    # print(cnt)
    h,w = readInts()
    mul = h * w # multiplication
    if mul % 2 == 0:
        print(mul // 2)
    else:
        print((mul+1)//2)
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ver_1 = (H + 1) // 2
ver_2 = H // 2
hor_1 = (W + 1) // 2
hor_2 = W // 2

ans = ver_1 * hor_1 + ver_2 * hor_2
print(ans)

Submission status: Wrong Answer

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

all = H * W

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
H,W = map(int,input().split())
if H == 1:
    print(0)
elif W == 1:
    print(0)
else:
    print(math.floor(H*W/2))

Submission status: Wrong Answer

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

if h%2 == 0:
    result = w*h/2

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

Submission status: Wrong Answer

Solution code:
inp=[int(x) for x in input().split()]
n,m=inp[0],inp[1]
p=n*m
if p%2==0:
    print(int(p/2))
else:
    print(int(p/2)+1)

Submission status: Wrong Answer

Solution code:
inp=[int(x) for x in input().split()]
n,m=inp[0],inp[1]
print(int(n*m/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a%2==0 and b%2==0:
    print(((a//2)*(b//2))*2)
elif a%2==0 and b%2!=0:
    print((a//2)*(b//2)*2+a//2)
elif a%2!=0 and b==0:
    print((a//2)*(b//2)*2+b//2)
else:
    print((a//2+1)*(b//2+1)+(a//2)*(b//3))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

input = sys.stdin.readline

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

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

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

print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
#coding:utf-8
h, w = map(int,input().split())

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

print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
#coding:utf-8
h, w = map(int,input().split())

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

print("{}".format(int(ans)))

Submission status: Wrong Answer

Solution code:
#coding:utf-8
h, w = map(int,input().split())

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

print("{}".format(int(ans)))

Submission status: Wrong Answer

Solution code:
#coding:utf-8
h, w = map(int,input().split())

if (h * w) % 2 == 0:
    ans = h * w * 0.5
else:
    ans = (h * w + 1) * 0.5

print("{}".format(int(ans)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

x,y = map(int,input().split())
print(math.ceil(x * y / 2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w = map(int,raw_input().split())
if h ==1 and w == 1:
    print 0
elif h ==1 or w == 1:
    print 1

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(int(Answer))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
#N = int(input())
#B = list(map(int,input().split()))
c=0
if H%2==0:
    c+=(H/2)*W
else:
    h = int(H/2)
    w = int(W/2)
    if W%2==0:
        c += (h+1) * w + h * w
    else:
        c += (h+1) * (w+1) + h * w
print(int(c))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
#N = int(input())
#B = list(map(int,input().split()))
c=0
if H%2==0:
    c+=(H/2)*W
else:
    h = int(H/2)
    w = int(W/2)
    if W%2==0:
        c += (h+1) * w + h * w
    else:
        c += (h+1) * (w+1) + h * w
print(c)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
def ABC(a):
    if a%2==1:
        return (a//2)+1
    elif a%2==0:
        return a//2
ans=(H//2)*(W//2)+(ABC(H)*ABC(W))
print(ans)

Submission status: Wrong Answer

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

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

def ABC(a):
    if a%2==1:
        return (a//2)+1
    else:
        return a//2
ans+=ABC(H)*ABC(W)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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