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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if W == 1:
    N = 1

elif H == 1:
    N = 1

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

print(int(N))

Submission status: Wrong Answer

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

if W == 1:
    N = 1

if W !=1:   
    if H % 2 ==0:
        N = H * W / 2
    elif H ==1 :
    	N = 1
    elif H % 2 ==1:
        N = int(H * W / 2) + 1

print(int(N))

Submission status: Wrong Answer

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

if W == 1:
    N = 1

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

print(int(N))

Submission status: Wrong Answer

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

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

print(N)

Submission status: Wrong Answer

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

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

print(N)

Submission status: Wrong Answer

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

if H % 2 ==0:
    N = H * W / 2

else:
    N = int(H * W / 2) + 1

print(N)

Submission status: Wrong Answer

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

if H % 2 ==0:
  N = H * W / 2

else:
  N = int(H * W / 2) + 1

print(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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 == 1:
    print(1)
    exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if h == 1 and w ==1:
    print("1")
elif h % 2 == 0:
    result = math.floor(sum /2)
    print(result)
else:
    result = math.floor(sum /2 + 1)
    print(result)

Submission status: Wrong Answer

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

if h == 1:
    print("1")
elif h % 2 == 0:
    result = math.floor(sum /2)
    print(result)
else:
    result = math.floor(sum /2 + 1)
    print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
x=l[0]*l[1]
if x%2==0:
    print(int(x/2))
else:
    print(int(x//2)+1)

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
x=l[0]*l[1]
if x%2==0:
    print(int(x/2))
else:
    print(int(x//2))

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
x=l[0]*l[1]
if x%2==0:
    print(x/2)
else:
    print(x//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 = list(map(int,input().split()))
tmp = H*W
if tmp%2 ==1: tmp = tmp + 1
print(int(tmp/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
def guki(n):
    if n%2 == 0:
        return "gu"
    else:
        return "ki"

def check(h, w):
    if guki(w) == "gu":
        k = w//2
        g = w//2
        if guki(h) == "gu":
            return (k+g)*(h//2)
        else:
            return (k+g)*(h//2)+k
    else:
        k = w//2 + 1
        g = k-1
        if guki(h) == "gu":
            return (k+g)*(h//2)
        else:
            return (k+g)*(h//2)+k

print(check(h, w))

Submission status: Wrong Answer

Solution code:
A = [int(a) for a in input().split()]
masu=int((A[0]*A[1]/2)+0.5)
if A[1]==0 or A[0]==0:
    print(1)
else:
    print(masu)

Submission status: Wrong Answer

Solution code:
A = [int(a) for a in input().split()]
masu=int((A[0]*A[1]/2)+0.5)
print(masu)

Submission status: Wrong Answer

Solution code:
A = [int(a) for a in input().split()]
masu=int(A[0]*A[1]/2+0.5)
print(masu)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def bfs(cx,cy,H,W,l):
  dx = [1,1,-1,-1]
  dy = [1,-1,-1,1]
  
  for i in range(4):
    nx = cx + dx[i]
    ny = cy + dy[i]
    if nx >= 0 and ny >= 0 and nx< W and ny < H:
      if l[ny][nx] == -1:
        l[ny][nx] = 1
        bfs(nx,ny,H,W,l)
      
      
l = [[-1 for _ in range(W)] for _ in range(H)]

sx = sy = 0

bfs(sx,sy,H,W,l)

count = 0
for i in range(H):
  for j in range(W):
    if l[i][j] == 1 :
      count+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    h,w = map(int,input().split())
    v = 0
    if h %2 == 0:
        v = h // 2
        print(v*w)
        return
    else:
        if w % 2 == 0:
            print(h*w//2)
            return
        else:
            print((w//2)*h*2//2 + h//2+1)
if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
##a=raw_input var1, var2, var3 = input().split()
#a=int(raw_input()) b=int(input())
#print(a+b)
a , b = input().split()
a=int(a)
b=int(b)
c=a*b
if(c%2==0):
    print(int(c/2))
else:
    d=c+1
    print(int(d/2))

Submission status: Wrong Answer

Solution code:
def main():
    h,w = map(int,input().split())
    v = 0
    if h %2 == 0:
        v = h // 2
        print(v*w)
        return
    else:
        if w % 2 == 0:
            print(w//2*h*2//2)
            return
        else:
            print((w//2)*h*2//2 + h//2+1)
if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
if H * W % 2 == 0:
    print(H * W // 2)
else:
    print((H * W + 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:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

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

if __name__=='__main__':
  main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count_1 = (h+1) // 2
count_2 = h // 2

loop_num = w // 2
add_num = w - (loop_num * 2)
print((count_1+count_2) * loop_num + (count_1 * add_num))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def LI():
	return [ int(s) for s in input().split() ]
 
H,W = LI()

if H == 1 or W == 1:
  print(1)
  sys.exit()
 
kisu_h = H//2 if H%2 == 0 else H//2+1
kisu_w = H//2 if W%2 == 0 else W//2+1
gusu_h = H//2
gusu_w = W//2
 
print(int(kisu_h*kisu_w + gusu_h*gusu_w))

Submission status: Wrong Answer

Solution code:
import math
n, m = map(int, input().split())
k=n*m
if n==1 or m==1:
  print(0)
  exit() 
else:
  print((k+1)//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#python3
from math import floor
def main():
    h, w = map(int, input().split())
    if h == 1 or w == 1:
        print(1)
        return
    ans = 0
    if h%2 == 0:
        ans = h//2 * w 
    else:
        ans = 1
    print(ans)
main()

Submission status: Wrong Answer

Solution code:
import math
n, m = map(int, input().split())

if n==1 or m==1:
  print(0)
  exit() 
else:
  print(math.ceil(n*m/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def LI():
	return [ int(s) for s in input().split() ]

H,W = LI()

kisu_h = H//2 if H%2 == 0 else H//2+1
kisu_w = H//2 if W%2 == 0 else W//2+1
gusu_h = H//2
gusu_w = W//2

print(int(kisu_h*kisu_w + gusu_h*gusu_w))

Submission status: Wrong Answer

Solution code:
import math

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

if (x*y)%2==1:
    print(((x*y)//2)+1)
else:
    print(x*y//2)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

if x*y%2==1:
    print((x*y//2)+1)
else:
    print(x*y//2)

Submission status: Wrong Answer

Solution code:
import math

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

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

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

Submission status: Wrong Answer

Solution code:
s=input().rstrip().split()
h=int(s[0])
w=int(s[1])
res =0
if h == 1 or w == 1:
  res = 1
elif h%2==0:
    res = (h/2) * w
else:
    if w%2==0:
        res = int(h/2) * w +  w/2  
    else:
        res = int(h/2) * w + int(w/2) + 1
print(res)

Submission status: Wrong Answer

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
h,w = i2()
if h == 1 or w == 1:
    print(1)
print(h*w//2 if h*w%2 == 0 else h*w//2+1)

Submission status: Wrong Answer

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
h,w = i2()
if h == 1 or w == 1:
    print(0)
print(h*w//2 if h*w%2 == 0 else h*w//2+1)

Submission status: Wrong Answer

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
h,w = i2()
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())
print((h * w) // 2 + (h * w) % 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def main():
    H, W = map(int, input().split())
    print((H//2) * W + ((H&1) * ((W//2) + (W&1))))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

def main():
    H, W = map(int, input().split())
    print((H//2) * W + (H&1) * ((W//2) + (W&1)))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

H, W = [int(_) for _ in input().split()]
if H == 1 and W == 1:
    print(1)
elif H %2 == 0:
    print(int(H*W/2))
else:
    print(int((H-1)*W/2) + int(math.ceil(W/2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
if(h == 1 and w == 1):
    print(1)
else:
    cCol = -(-w // 2)
    cRow = -(-h // 2)
    fCol = w - cCol
    fRow = h - cRow
    print(cRow * cCol + fRow * fCol)

Submission status: Wrong Answer

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, W = lr()
if H % 2 == 0:
    answer = H//2 * W
elif W % 2 == 0:
    answer = W//2 * H
else:
    #どちらも奇数
    #下一段を別に数える
    answer = H//2 * W
    answer += (W+1) // 2
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys
sys.setrecursionlimit(300000)


def solve(H: int, W: int):
    ret = ((W + 1) // 2) * ((H + 1) // 2) + (W // 2) * (H // 2)
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    solve(H, W)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys
sys.setrecursionlimit(300000)


def solve(H: int, W: int):
    ret = W * (H // 2)
    if H % 2:
        ret += (W + 1) // 2
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    solve(H, W)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

ans = H*W//2
ans += ans % 2

print(ans)

Submission status: Wrong Answer

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

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

ans = H*W//2
ans += ans % 2

print(ans)

Submission status: Wrong Answer

Solution code:
from math import floor, ceil

H, W = map(int, input().split())
even_col = ceil(H / 2)
even_row = ceil(W / 2)
odd_col = floor(H / 2)
odd_row = floor(W / 2)
print(even_col * even_row + odd_col * odd_row)

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+0.5))

Submission status: Wrong Answer

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

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, raw_input().strip().split())
print str((h * w + 1) / 2)

Submission status: Wrong Answer

Solution code:
h, w = map(int, raw_input().strip().split())
str((h * w + 1) / 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w=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)

Submission status: Wrong Answer

Solution code:
def A():
    seq = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    K = int(input())
    print(seq[K-1])

import math
def B():
    H, W = map(int, input().split())
    print(int(math.ceil(H*W/2.0)))
B()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num1, num2 = map(int, input().split(" "))
ans = num1 * int(num2 / 2) + ((num2 % 2) * int(num1 / 2))
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
HW = [int(i) for i in input().split(' ')]
H = HW[0]
W = HW[1]

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
HW = [int(i) for i in input().split(' ')]
H = HW[0]
W = HW[1]
if H % 2 == 0:
    print(int((H/2*W)))
else:
    vertical = (H+1) / 2
    if W % 2 == 0:
      ho = W / 2
      print(int(vertical * ho + (vertical-1) * ho))
    else:
      ho = (W+1) / 2
      print(int(vertical * ho + (vertical-1) * (ho-1)))

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

if h == 1 or w ==1:
  print(int(1))
elif h % 2 == 0:
  print("{:.0f}".format(h*w/2))

else:
  a1 = h*(w//2)//2
  a2 = int(a1*2) +1
  print("{:.0f}".format(a2))

Submission status: Wrong Answer

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

if h % 2 == 0:
  print("{:.0f}".format(h*w/2))
elif h == 1 or w ==1:
  print(int(1))

else:
  a1 = h*(w//2)//2
  a2 = int(a1*2) +1
  print("{:.0f}".format(a2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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