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 h % 2 == 0:
    tate = h // 2
    print(tate * w)
    exit(0)
else:
    tate1 = h // 2 + 1
    tate2 = tate1 - 1
    if w % 2 == 0:
        print(tate1 * (w // 2) + tate2 * (w // 2))
    else:
        yoko1 = w // 2 + 1
        yoko2 = yoko1 - 1
        print(tate1 * yoko1 + tate2 * yoko2)
        exit(0)

Submission status: Wrong Answer

Solution code:
H, W = [int(e) for e in input().split()]
print(int((H*W+1)/2))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
a,b=map(int, input().split())

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

Submission status: Wrong Answer

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

w1 = math.ceil(W/2)*math.ceil(H/2)
w2 = math.floor(W/2)*math.floor(H/2)

if W != 1:
    print(w1+w2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
ans = 0
wx = W // 2
hx = H // 2
wy = W % 2
hy = H % 2

if wy == 0 and hy == 0:
  ans += (W * H) / 2
elif wy == 1 and hy == 0:
  ans += (((W-1)*H)/2) + H / 2
elif wy == 0 and hy == 1:
  ans += ((W*(H-1))/2) + W / 2
else:
  ans += (((W-1)*(H-1))/2) + (W-1) / 2 + (H-1) / 2 + 1
print(int(ans))

Submission status: Wrong Answer

Solution code:
import sys
n = list(map(int, input().split()))

if n[0] % 2 == 0:
    print((n[0]*n[1])/2)
    sys.exit()
else:
    if n[1] % 2 == 0:
        print((n[0]*n[1])/2)
        sys.exit()
    else:
        b = int((n[0]*n[1])/2)
        print((n[0]*n[1])-b)
        sys.exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = H*W

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main(w,h):
    x1 = int(w/2 if w%2 == 0 else (w+1)/2)
    x2 = int(w/2 if w%2 == 0 else (w-1)/2)
    if(h%2 == 0):
        res = (h/2)*(x1+x2)
    else:
        res = ((h-1)/2)*(x1+x2) + x1
    return int(res)

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

Submission status: Wrong Answer

Solution code:

def main():
  
  h, w = list(map(int, input().split()))
  
  return -(-(h * w) // 2)

print(main())

Submission status: Wrong Answer

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

import sys

a = (W+1)//2+(W//2)

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

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

Submission status: Wrong Answer

Solution code:
h = list(map(int, input().split()))
a = (h[0]+1)//2
b = (h[0])//2
c = (h[1]+1)//2
d = (h[1])//2
print(a*c+b*d)

Submission status: Wrong Answer

Solution code:
HK=input().split(' ')
H=int(HK[0])
K=int(HK[1])
if K % 2==1 and H%2==1:
    print(int(round(H*K/2)+1))
else:
    print(int(H*K/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

H, W = map(int, sys.stdin.readline().strip().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())
ans = (h//2) * w
if h%2 == 1:
    ans += w//2
if h%2 == w%2 == 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

x = h*w

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

if x%2==0:
  print(int(x/2))
else:
  print(int(math.ceil(x/2)+1))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Sat Mar 14 12:11:43 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()

H, W = na()

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

Submission status: Wrong Answer

Solution code:
from math import ceil
from decimal import Decimal
h,w = map(int,input().split())
if (h*w)%2 == 0:
  print(Decimal((h*w)/2))
else:
  print(Decimal(ceil((h*w)/2)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
d = input().split(" ")
h = int(d[0])
w = int(d[1])
if h == 1 and w == 1:
	p = 1
elif h % 2 == 1 and w % 2 == 1:
	p = int(h * w / 2) + 1
else:
	p = int(h * w / 2)
print(p)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

r = H * W // 2
s = H * W % 2

print(r+s)

Submission status: Wrong Answer

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

if cells % 2 == 1:
    ans += 1


print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
H, W = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(round(H*W/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ceil_H = math.ceil(H / 2)
floor_H = math.floor(H / 2)

ceil_W = math.ceil(W / 2)
floor_W = math.floor(W / 2)

print(ceil_H * ceil_W + floor_H * floor_W)

Submission status: Wrong Answer

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  h,w=LI()
  a=(w+1)//2
  b=w//2

  if h==1:
    return 1

  if h%2==0:
    return h//2*a+h//2*b
  return (h+1)//2*a+h//2*b

# main()
print(main())

Submission status: Wrong Answer

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

hq, hmod = divmod(h, 2)
wq, wmod = divmod(w, 2)

ans = hq * w + hmod * (wq + wmod)
print(ans)

Submission status: Wrong Answer

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

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

print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
h, w = [int(v) for v in input().split()]
print(math.ceil(h*w/2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 14 21:08:49 2020

@author: H_Hoshigi
"""

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

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

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

Submission status: Wrong Answer

Solution code:
import math
H,W=map(int,input().split())
if W==1:
    print(1)
else:
    if H % 2 == 0:
        a = math.ceil(W / 2)
        b = math.floor(W / 2)
        c = H / 2
        print(int(a * c + b * c))
    else:
        a = math.ceil(W / 2)
        b = math.floor(W / 2)
        c = math.ceil(H / 2)
        d = math.floor(H / 2)
        print(int((a * c + b * d)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil
l = [int(j) for j in input().split()]
print(ceil(l[0]*l[1]))

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

s = h * w / 2

if (h>1) and (w>1):
    if s % 2 == 0:
        t = int(s)
    else:
        t = int (s + 1)
else:
    t = int(1)

print (t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h , w = map(int, input().split())
start = [0,0]
a1 = h//2 + 1 if h % 2 != 0 else h//2
a2 = h - a1
a3 = w//2 + 1 if h%2!=0 else w//2
a4 = w - a3
ans = a1*a3 + a2*a4
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if W % 2 == 0:
    w = W // 2
    print(H * w)
else:
    w1 = W // 2 + 1
    w2 = w1 - 1
    if H % 2 == 0:
        h = H // 2
        print(h * w1 + h * w2)
    else:
        h1 = H // 2 + 1
        h2 = h1 - 1
        print(h1 * w1 + h2 * w2)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
if(w%2==1):
    w1=(w//2)+1
    w2=w//2
else:
    w1=(w//2)
    w2=(w//2)+1
if(h%2==1):
    h1=(h//2)+1
    h2=(h//2)
else:
    h1=(h//2)
    h2=(h//2)+1

if(w%2==1 and h%2==1):
    ans=w1*h1+w2*h2
elif(w%2==1 and h%2==0):
    ans=w1*h1+w2*h1
elif(w%2==0 and h%2==1):
    ans=w1*h1+w2*h2
else:
    ans=w1*h1+w1*h1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
H, W = map(int, input().split())

#偶数
H_2 = int(H/2)
W_2 = int(W/2)
if(H%2 == 0):
  ans = H_2*W
else:
  ans = (H_2)*W + (W_2+1)


print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

dep = h // 2
wid = w // 2

if h == 1 or w == 1:
    print(0)
    exit()
if h % 2 == 0:
    print(dep * w)
else:
    print((dep + 1) * (w - wid) + dep * wid)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if H == 1 or W == 1:
    print(0)
elif (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("{}".format(int(H * W / 2)))
else:
    print("{}".format(int(H * W / 2)))

Submission status: Wrong Answer

Solution code:
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd
import sys
#input = sys.stdin.readline


#N=int(input())

#A=list(map(int,input().split()))
#XY=[list(map(int,input().split())) for i in range(N)]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

h, w = (int(item) for item in input().split(' '))
print(math.ceil(h*w/2))

Submission status: Wrong Answer

Solution code:
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
print(math.ceil(area / 2))

Submission status: Wrong Answer

Solution code:
import math

h, w = [int(x) for x in input().split()]
print(math.ceil(h * w / 2.0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if W % 2 == 0:
    x = W // 2
    y = W // 2
else:
    x = W // 2 + 1
    y = W // 2

if H % 2 == 0:
    ans = (x + y) * (H // 2)
else:
    ans = (x + y) * (H // 2) + x
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

    print(int(ans))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

ans = (l+m) * (H//2)
if H%2 == 1:
    ans += l
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
import fractions

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

Submission status: Wrong Answer

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

A = H * W

if A % 2 == 0:
  print(int(A / 2))
else:
  print(int((A - 1) / 2 + 1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
HK=input().split(' ')
H=int(HK[0])
K=int(HK[1])
if K % 2==1 and H%2==1:
    print(round(H*K/2)+1)
else:
    print(int(H*K/2))

Submission status: Wrong Answer

Solution code:
import sys
import re

l = sys.stdin.readline()
l = l.split(' ')
l = [int(str) for str in l]

h = l[0]
w = l[1]

out = 0
for i in range(0,w):
 if( i % 2 == 0):
  if( h % 2 == 1 ):
    out += h/2 + 1 
  else:
    out += h/2
 else:
  out += h/2

print(out)
sys.stdout.flush()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

H = int(H)
W = int(W)

t = H * W

mod = t % 2

if mod == 0:
    print(int(t/2))
else:
    print(int(t/2) + 1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

h2 = h // 2
row = (w+1) // 2

num2 = h2 * w
if h % 2 == 1:
    num2 += row

print(num2)

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
def main():
    H, W = map(int, input().split())
    if W == 1:
        print(1)
    else:
        a = math.ceil(W/2) * math.ceil(H/2)
        b = math.floor(W/2) * math.floor(H/2)
        print(a+b)

if __name__ == '__main__':
    main()

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

Submission status: Wrong Answer

Solution code:
h,w = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

a = ((h+1)//2) * ((w+1)//2)
b = ((h)//2) * ((w)//2)

print(a+b)

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007

#+++++

def main():
	b , c = IN()
	print((b*c+1)//2)

	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if H % 2 == 0: # 縦が偶数
    print((H // 2) * W)
else: # 縦が奇数
    # １行目
    if W % 2 == 0:
        s = (W // 2)
    else:
        s = (W // 2) + 1
    
    print( ((H-1) // 2)*W + s )

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

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:
import math

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

if (h*w)%2==0:
    print(int(h*w/2))
else:
    print(math.ceil(h*w/2))

Submission status: Wrong Answer

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

cnt = 0
cnt += ((w+1)//2)*(h//2)
cnt += (w//2)*(h//2)
if h&1 == 1:
    cnt += ((w+1)//2)

print(cnt)

Submission status: Wrong Answer

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

def solve(H: int, W: int):
    decimal.getcontext().prec = 21
    if(H*W%2==0):
        print(decimal.Decimal(H*W/2))
    else:
        print(decimal.Decimal(H*W//2+1))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
H,W=map(int,input().split())
A=0
if H%2==1:
    if W%2==1:
        A=W//2+1
    else:
        A=W//2
print(H//2 * W + A)

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(' '))
masu=0

masu=masu+(w*(h//2))

if h%2==1:
    if w%2==1:
        masu=masu+(w//2)+1
    else:
        masu=masu+(w//2)
    

if h==1 and w==1:
    masu=0

print(masu)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

print((h*w)//2)

Submission status: Wrong Answer

Solution code:
import math

hw = input().split(' ')
h = int(hw[0])
w = int(hw[1])

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

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)