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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np


h,w = list(map(int,input().split()))
print( int(np.ceil(h*w/2)))

Submission status: Wrong Answer

Solution code:
num = input().split(" ")
if "1" in num:
  print(1)
else:
  A = int(num[0])*int(num[1])/2
  if type(A) == float:
    print(int(A)+1)
  else:
    print(A)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
num = input().split(" ")
gu = int(num[1]) // 2
ki = int(num[1]) - int(gu)
gu2 = int(num[0]) // 2
ki2 = int(num[0]) - int(gu2)
print(gu * gu2 + ki * ki2)

Submission status: Wrong Answer

Solution code:
num = input().split(" ")
gu = int(num[1]) // 2
ki = int(num[1]) - gu
a = 0
gu2 = int(num[0]) // 2
ki2 = int(num[0]) - gu2
print(gu2 * gu + ki * ki2)

Submission status: Wrong Answer

Solution code:
num = input().split(" ")
ki = 0
gu = 0
sum_kaku = 0
for a in range(int(num[1])):
  if a % 2 == 0:
    gu += 1
  else:
    ki += 1
a = 0
while a < int(num[1]):
  if a % 2 == 0:
    sum_kaku += ki
  else:
    sum_kaku += gu
  a += 1
print(sum_kaku)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print( h * w // 2 + ( (h * w) % 2 != 0 ) )

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
Height, Width = map(int,input().split())
masu = Height * Width 
if masu % 2 == 0:
    print(masu // 2)
else:
    print(masu // 2 + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if W%2==0:
    print((W//2)*H)
else:
    print(ceil(W/2)*ceil(H/2)+(W//2)*(H//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:
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter

# stdin = open("sample.txt")

h, w = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter

# stdin = open("sample.txt")

h, w = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter

# stdin = open("sample.txt")

h, w = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter

# stdin = open("sample.txt")

h, w = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():

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

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

    else:
        print(int((total+1)/2))

    return

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

from sys import stdin, stderr

def main():
   H, W = map(int, stdin.readline().split())

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

   print(res)

   return 0

if __name__ == '__main__': main()

Submission status: Wrong Answer

Solution code:
H,M=map(int, input().split())
t=min(H,M)
m=max(H,M)
if t//2==0:
  print(int(t**2/4+(m-t)*t/2)) 
else:
  n=(t-1)/2
  if m//2==0:
    print(int(2*n**2+2*n+1+(m-t)*n+(m-t-1)/2))
  else:
    print(int(2*n**2+2*n+1+(m-t)*t/2))

Submission status: Wrong Answer

Solution code:
import math

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

Ho, He = math.ceil(H / 2), math.floor(H / 2)
o, e = math.ceil(W / 2), math.floor(W / 2)

print(Ho * o + He * e)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

S = (H * M)
if S%2 == 1:
  S = S / 2 + 1
  print(S)
else:
  S = S / 2
  print(S)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
h, w = [int(i) for i in input().split()]
n = h*w/2
print(Decimal(n).quantize(Decimal('0'), rounding=ROUND_HALF_UP))

Submission status: Wrong Answer

Solution code:
tate, yoko = (int(x) for x in input().split())
number = tate * yoko // 2
if (tate * yoko % 2 == 0):
  print(number)
else:
  number = number + 1
  print(number)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

# A = [list(map(int, input().split())) for _ in range(3)]
# k = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
h, w = map(int, input().split())
print(math.ceil((h*w)/2))

Submission status: Wrong Answer

Solution code:
import math

# A = [list(map(int, input().split())) for _ in range(3)]
# k = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
h, w = map(int, input().split())
print(math.ceil(h*w/2))

Submission status: Wrong Answer

Solution code:
import math

# A = [list(map(int, input().split())) for _ in range(3)]
# k = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
h, w = map(int, input().split())
print(math.ceil(h*w))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

elif(h%2 == 1) and (w%2 == 1):
  a =(h//2)*(w//2)
  b =((h//2)+1)*((w//2)+1)
  answer = a+b
  print(answer)

Submission status: Wrong Answer

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

else:
  a =(h//2)*(w//2)
  b =((h//2)+1)*((w//2)+1)
  answer =a+b
  print(answer)

Submission status: Wrong Answer

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

else:
  answer =((h//2)*(w//2))+(((h//2)+1)*((w//2)+1))
  print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, w = (int(inp) for inp in input().split())

if h < 2 or w < 2:
  print(0)
  exit()

x1 = int(h / 2)
x2 = int(h / 2)
y1 = int(w / 2)
y2 = int(w / 2)

if w % 2 != 0:
  x1 += 1

if h % 2 != 0:
  y1 += 1
  

print(int(x1 * y1 + x2 * y2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, w = (int(inp) for inp in input().split())

x1 = int(h / 2)
x2 = int(h / 2)
y1 = int(w / 2)
y2 = int(w / 2)

if w % 2 != 0:
  x1 += 1

if h % 2 != 0:
  y1 += 1

  
if w < 2:
  x1 = 0
  x2 = 0

if h < 2:
  y1 = 0
  y1 = 0
  
print(int(x1 * y1 + x2 * y2))

Submission status: Wrong Answer

Solution code:
h, w = (int(inp) for inp in input().split())

x1 = int(h / 2)
x2 = int(h / 2)
y1 = int(w / 2)
y2 = int(w / 2)

if w % 2 != 0:
  x1 += 1

if h % 2 != 0:
  y1 += 1
  
print(int(x1 * y1 + x2 * y2))

Submission status: Wrong Answer

Solution code:
h, w = (int(inp) for inp in input().split())

x1 = int(h / 2)
x2 = int(h / 2)
y1 = int(w / 2)
y2 = int(w / 2)

if w % 2 != 0:
  x1 += 1

if h % 2 != 0:
  y2 -= 1
  
print(int(x1 * y1 + x2 * y2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
h,w = map(int,input().split())
#h 縦
#w 横
if w == 1 or h == 1 :
    print("1")
elif h % 2 == 0:
    result = h * w /2
    result = math.ceil(result)
    print(str(result))
elif h % 2 != 0:
    result = ((h * w) // 2 )+ 1
    result = math.ceil(result)
    print(str(result))
else:
    print("1")

Submission status: Wrong Answer

Solution code:
import math
h,w = map(int,input().split())
#h 縦
#w 横
if w == 1 or h == 1 :
    print("1")
elif h % 2 == 0:
    result = h * w /2
    result = math.ceil(result)
    print(str(result))
else:
    result = ((h * w) // 2 )+ 1
    result = math.ceil(result)
    print(str(result))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

odd = (w + 1)// 2
even = w // 2


odd_count = (h + 1) // 2
even_count = h // 2

print(odd * odd_count + even * even_count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil
n,m=input().split()
n=int(n)
m=int(m)
print(ceil((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:
H,W=map(int,input().split())
if H % 2 != 0 and W % 2 != 0: 
	print(int((H*W/2)+1))
else:
  	print(int(H*W/2))

Submission status: Wrong Answer

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

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

hw=int(h)*int(w)
tmp1,tmp2=divmod(hw,2)

if(tmp2==0):
  print(tmp1)
else:
  print(tmp1+1)

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
A = a//2
B = b//2
C = a - A
D = b - B
E = C*D
F = A*B
print(E+F)

Submission status: Wrong Answer

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

hw=int(h)*int(w)
tmp1,tmp2=divmod(hw,2)

if(tmp2==0):
  print(tmp1)
else:
  print(tmp1+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
seki=H*W
if seki%2==0:
  print(seki/2)
else:
  print(seki//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())
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
print(ceil(H/2*W))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
print(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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
if H*W == 1:
    print(1)
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())
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
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())
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
ans = ceil(W/2)*ceil(H/2) + (W//2)*(H//2)
print(ans)

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
import sys
 
input = sys.stdin.readline
H, W = list(map(int,input().split()))
 
if H==1 or W==1:
    print(1)
    exit(0)

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

Submission status: Wrong Answer

Solution code:
var = [int(s) for s in input().split()]

print(int(var[0]*var[1] / 2 +0.5))

Submission status: Wrong Answer

Solution code:
var = [int(s) for s in input().split()]

print(int(var[0]*var[1] / 2 +0.6))

Submission status: Wrong Answer

Solution code:
import sys
 
input = sys.stdin.readline
H, W = list(map(int,input().split()))
 
if H==1 or W==1:
    print(1)

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

Submission status: Wrong Answer

Solution code:
import sys
 
input = sys.stdin.readline
A, B = list(map(int,input().split()))
 
ans = int(A * B //2)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
A, B = list(map(int,input().split()))

print(A*B//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
A = a//2
B = b//2
C = a - A
D = b - B
E = C*D
F = A*B
print(int(E+F))

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
A = a//2
B = b//2
C = a - A
D = b - B
E = C*D
F = A*B
print(E+F)

Submission status: Wrong Answer

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

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

print(a)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

if h%2:
      H=h//2+1
      print(H*w-(w//2))
      exit()
else:
      H=h//2
      print(H*w)
      exit()

Submission status: Wrong Answer

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

if h%2:
      H=h//2+1
      print(H*w-(w//2))
      exit()
else:
      H=h//2
      print(H*w)
      exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
if h==1 or w==1: #コーナーケース
    print(1)
elif h%2 != w%2 != 0: #両者奇数
    print(h*w//2 + 1)
else:
    print(h*w//2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(int(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math as m

h, w = map(int, input().split())
print(m.ceil(h * w / 2) if h == 1 or w == 1 else 1)

Submission status: Wrong Answer

Solution code:
import math as m

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]==1 or data[1]==1:
    print(1)
elif (data[0]*data[0])%2==0:
    print(str(int(data[0]*data[1])/2.0))
else:
    print(str(int((data[0]*data[1]+1)/2)))

Submission status: Wrong Answer

Solution code:
i = input().split()
h = int(i[0])
w = int(i[1])

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

Submission status: Wrong Answer

Solution code:
i = input().split()
h = int(i[0])
w = int(i[1])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

temp=-(-H//2)



print(temp*(W%2)+H*(W//2))

Submission status: Wrong Answer

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

if H%2==0:
    Ha="even"
else:
    Ha="odd"

if W%2==0:
    Wa="even"
else:
    Wa="odd"

if Ha=="even"or Wa=="even":
    print(math.floor(H*W/2))
else:
    print(math.floor(H*W/2+0.5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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