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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

h, w = LI()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if total % 2:
    ans = (total + 1)//2

else:
    ans = total//2

print(ans)

Submission status: Wrong Answer

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

if w % 2: #wide size = odd
    if h % 2: #both wide, high = odd
        ans = (total + 1)/2
        print(ans)
        exit()
ans = total/2
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H,W = (int(x) for x in input().split())
if (H*W)%2:#odd
  print((H*W-1)//2 + 1)
else:#even
  print((H*W)//2)

Submission status: Wrong Answer

Solution code:
H,W = (int(x) for x in input().split())
if (H*W)%2:#odd
  print((H*W-1)//2 + 1)
else:#even
  print((H*W)//2)

Submission status: Wrong Answer

Solution code:
H,W = (int(x) for x in input().split())
if H*W%2:#odd
  print((H*W-1)//2 + 1)
else:#even
  print(H*W//2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin/python3
# https://atcoder.jp/contests/panasonic2020/tasks/panasonic2020_b
import math

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
print((eval(input().replace(*" *")) + 1) // 2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP
A, B = map(int, input().split())
print(Decimal(A*B/2.0).quantize(Decimal('0'), rounding=ROUND_HALF_UP))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
print(round(A*B/2.0))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
print(round(A/B))

Submission status: Wrong Answer

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


def solve(H: int, W: int):
    ans = math.ceil(H / 2) * math.ceil(W / 2) + (H // 2) * (W // 2)
    return print(ans)


# Generated by 1.1.7.1 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:

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

Submission status: Wrong Answer

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

print(A)

Submission status: Wrong Answer

Solution code:
a = [int(c) for c in input().split()]
H = a[0]
W = a[1]

#奇数行では列数/2+1
#偶数行では列数/2(余り無視)
cnt = 0
for i in range(1,H+1):
    if i %2 == 1:
        cnt += int(W/2)+1
    else:
        cnt += int(W/2)
print(cnt)

Submission status: Wrong Answer

Solution code:
a = [int(c) for c in input().split()]
r = a[0]*a[1]
if r % 2 == 0:
    print(int(r/2))
else:
    print(int(r/2+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
h, w = map(int,input().split())
count = 0
if h % 2 != 0:
    count += math.ceil(w / 2)
count += w * math.floor(h / 2)
print(count)

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int,input().split())

if a == b == 1:
    print(1)
else:
    print(math.ceil(a*b/2))

Submission status: Wrong Answer

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

if h == 1:
    print(1)
else:
    print(math.ceil(h/2*w))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int,input().split())

c = math.ceil(a*b/2)
print(c)

Submission status: Wrong Answer

Solution code:
import math

a,b = map(int,input().split())

c = a*b/2
print(c)

Submission status: Wrong Answer

Solution code:
import sys
from itertools import islice, tee


def resolve(in_):
    H, W = map(int, next(in_).split())
    h0, h1 = divmod(H, 2)
    w0, w1 = divmod(W, 2)

    if not h0 or not w0:
        return 0

    answer = h0 * w0 * 2
    if h1:
        answer += w0
    if w1:
        answer += h0
    if h1 and w1:
        answer += 1

    return answer


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
from itertools import islice, tee


def resolve(in_):
    H, W = map(int, next(in_).split())
    h0, h1 = divmod(H, 2)
    w0, w1 = divmod(W, 2)

    answer = h0 * w0 * 2
    if h1:
        answer += w0
    if w1:
        answer += h0
    if h1 and w1:
        answer += 1

    return answer


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

h_odd = (h+1)//2
h_even = h//2
w_odd = (w+1)//2
w_even = w//2

ans = h_odd * w_odd + h_even *w_even

print(ans)

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    h,w = map(int,input().split())
    flag=h*w
    if flag==1:
        print(1)
        exit()
    if flag % 2 ==0:
        print(flag//2)
    else:
        print(int(flag/2)+1)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

if __name__=="__main__":
    main()

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
# B - Bishop
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())
print(math.ceil(h*w/2))

Submission status: Wrong Answer

Solution code:
# パナソニックプログラミングコンテスト2020: B – Bishop
H, W = [int(i) for i in input().split()]

can_reach = 0

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

print(can_reach)

Submission status: Wrong Answer

Solution code:
# パナソニックプログラミングコンテスト2020: B – Bishop
H, W = [int(i) for i in input().split()]

can_reach = 0

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

print(can_reach)

Submission status: Wrong Answer

Solution code:
# パナソニックプログラミングコンテスト2020: B – Bishop
H, W = [int(i) for i in input().split()]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# 回答を読んで作成
# 全体の半分に到達可能、ただし１行もしくは１列の時は動けない
h,w = map(int, input().split())
if h==0 or w==0:
  ans = 1
else:
  ch = (h*w)/2
  ans = (ch//1)+((h*w)%2)
print(int(ans))

Submission status: Wrong Answer

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

if H%2==0 or W%2==0:
  ans = int(H*W/2)
else:
  if H==1 or W==1:
    # コーナーケース
    ans = 1
  else:
  	ans = int(H*W+1/2)
print(ans)

Submission status: Wrong Answer

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

if H%2==0 or W%2==0:
  ans = int(H*W/2)
else:
  if H==1 or W==1:
    # コーナーケース
    ans = 1
  else:
  	ans = int(H*W+1//2)
print(ans)

Submission status: Wrong Answer

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

if H%2==0 or W%2==0:
  ans = int(H*W/2)
else:
  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%2==0 or W%2==0:
  ans = int(H*W/2)
else:
  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%2==0 or W%2==0:
  ans = int(H*W/2)
else:
  if H==1 or W==1:
    # コーナーケース
    ans = 1
  else:
  	ans = (H*W//2)+1
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
a = input("").split(" ")
a = [int(aa) for aa in a]
H = a[0]
W = a[1]
if H == 1 or W == 1:
    print("0")
elif H % 2 == 0:
    print(str(int(H/2)*W))
elif W % 2 == 0:
    print(str(int(W/2)*H))
else:
    p = int((H+1)/2)
    q = int((W+1)/2)
    print(str(p*q+(p-1)*(q-1)))

Submission status: Wrong Answer

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

mass = H * W
if H*W % 2 == 0:
  s = (H * W) // 2
elif H*W % 2 != 0:
  s = (H * W + 1) // 2
elif H == 1 or W  == 1:
  s = 1


print(s)

Submission status: Wrong Answer

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

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


print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from math import ceil


def main():
    input = sys.stdin.buffer.readline
    h, w = map(int, input().split())
    print(ceil(h * w / 2))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys


def main():
    input = sys.stdin.buffer.readline
    h, w = map(int, input().split())
    print(h * w // 2)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

result = 0

result += -(-H // 2) * -(-W // 2)
result += (H // 2) * (W // 2)

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

x = list(map(int, input().split()))

h = x[0]
w = x[1]

if (w == 1):
    count = 1
else:
    count = math.ceil(h/2) * math.ceil(w/2) + math.floor(h/2) * math.floor(w/2)

'''
for i in range(h):
    if i % 2 == 0:
        count += math.ceil(w/2)
    else:
        count += math.floor(w/2)
'''

print(count)

Submission status: Wrong Answer

Solution code:
import math

x = list(map(int, input().split()))

h = x[0]
w = x[1]

count = math.ceil(h/2) * math.ceil(w/2) + math.floor(h/2) * math.floor(w/2)

'''
for i in range(h):
    if i % 2 == 0:
        count += math.ceil(w/2)
    else:
        count += math.floor(w/2)
'''

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy006_B_Bishop_25-August-2020.py"""

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:
"""Boot-camp-for-Beginners_Easy006_B_Bishop_25-August-2020.py"""
import numpy as np

H, W = (map(int, input().split()))
if (H*W)%2==0:
    print(int(H*W/2))
else:
    print(int(np.ceil(H*W/2)))

Submission status: Wrong Answer

Solution code:
"""Boot-camp-for-Beginners_Easy006_B_Bishop_25-August-2020.py"""
import numpy as np

H, W = list(map(int, input().split()))
#odd
if (H*W)%2==0:
    print(int(H*W/2))
#even
else:
    print(int(np.ceil(H*W/2)))

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math

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

first_row = math.ceil(w / 2)
second_row = w - first_row

first_row_column = math.ceil(h / 2)
second_row_column = h - first_row_column

print(first_row_column * first_row + second_row_column * second_row)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
H, W = [int(x) for x in input().split()]
h = -(-H//2)
if(H%2)==0:
  print(h*W)
  sys.exit()
else:
  if(W%2)==0:
    print(h*W-W/2)
    sys.exit()
  else:
    print(h*W-W//2)
    sys.exit()

Submission status: Wrong Answer

Solution code:
print((eval(input().replace(' ','*'))+1)//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a,b=map(int,input().split())

print(math.ceil(a*b/2))

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())

num=0
for i in range(b):
  if i%2==0:
    num+=math.ceil(a/2)
  else:
    num+=math.floor(a/2)
  
print(num)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

# a/bの切り上げ: (a + b - 1)//b
print(((h * w) + 2 - 1) // 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-1))//2+(h+1)//2)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
print(math.ceil(a*b/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
count = 0
for h in range(1, H+1):
    for w in range(1, W+1):
        if  (h + w) % 2 == 0: 
            count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def solve():
    ans = 0
    ans += math.ceil(w/2)*math.ceil(h/2)
    ans += (w//2)*(h//2)
    print(ans)
    return

if __name__=='__main__':
    h,w = IL()
    solve()

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

class vector():
    def __init__(self, x, y):
        self.x = x
        self.y = y

def solve():
    ans = 0
    ans += math.ceil(w/2)*math.ceil(h/2)
    ans += math.floor(w/2)*math.floor(h/2)
    print(ans)
    return

if __name__=='__main__':
    h,w = IL()
    solve()

Submission status: Wrong Answer

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