qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import sys

H, W = map(int, input().split())
if H or W ==1:
    print(1)
    sys.exit()

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


Fixed code:
import sys

H, W = map(int, input().split())
if H == 1 or W == 1:
    print(1)
    sys.exit()

a = H * W
if a % 2 == 0:
    answer = a // 2
else:
    answer = a // 2 + 1
print(answer)
Buggy code:
h,w=map(int,input().split())
 
if w%2==0:
  if h==1:
    print(1)
  elif:
    print((w//2)*h)
elif w==1:
  print(1)
elif w%2!=0:
  if h%2==0:
    print(w*(h//2))
  else:
    print(w*((h-1)//2)+(w+1)//2)


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

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

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

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


Fixed code:
H,W = map(int,input().split())
ans = 0
if H==1 or W == 1:
  ans = 1
elif H%2==0:
  ans = H * W // 2
elif W%2 == 0:
  ans = H * W // 2
else:
  ans = (H * W) // 2 + 1
print(ans)
Buggy code:
import numpy as np
import sys

input = sys.stdin.readline

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

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

Fixed code:
import numpy as np
import sys

input = sys.stdin.readline

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+1)
Buggy code:
h, w = map(int, input().split())

if h == 1 and w == 1:
    print(1)
else:
    import math
    h_odds = math.ceil(h / 2)
    h_evens = h // 2
    w_odds = math.ceil(w / 2)
    w_evens = w // 2
    print(h_odds * w_evens + h_evens * w_odds)


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

if h == 1 or w == 1:
    print(1)
else:
    import math
    h_odds = math.ceil(h / 2)
    h_evens = h // 2
    w_odds = math.ceil(w / 2)
    w_evens = w // 2
    print(h_odds * w_odds + h_evens * w_evens)
Buggy code:
H,W=map(int, input().split())
if (H==1 or W==1):
  print(1)
else:
  print((H*W+1)/2)


Fixed code:
H,W = map(int,input().split())
if H == 1 or W == 1:
    print(1)
elif (H*W)%2 == 1:
    print(H*W//2+1)
else:
    print(H*W//2)
Buggy code:
import sys
import numpy as np
import heapq


def input():
    return sys.stdin.readline()[:-1]


def solve():
    H,W = map(int, input().split())
    c = W//2
    
    if H%2==0:
        ans = (H//2)*(2*c+1)
    else:
        ans = (H//2)*c + (H//2+1)*(c+1)
    print(ans)


if __name__ == "__main__":
    solve()


Fixed code:
import sys
import numpy as np
import heapq


def input():
    return sys.stdin.readline()[:-1]


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


if __name__ == "__main__":
    solve()
Buggy code:
H,W=map(int,input().split())
if(H==1 or R==1):
  print(1)
else:
  if((H*W)%2==0):
    print(int(H*W/2))
  else:
    print(int(H*W/2)+1)

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

if (H == 1 or W == 1):
    print(1)
    exit(0)
if ((H * W) % 2 == 0): print(H * W // 2)
else: print(H * W // 2 + 1)
Buggy code:
h, w = [int(x) for x in input().split()]

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

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

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

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

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

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

Fixed code:
H, W = map(int, input().split())
if H==1 or W==1:
    print(1)
else:
    print(-(-(H*W)//2))
Buggy code:
def resolve():
    H, W = map(int, input().split())
    ans = int((H*W-1)/2)
    if H == 1 or W == 1:
        print(1)
    else:
        print(ans)
resolve()


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

Fixed 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)
Buggy 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)


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


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

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

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

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


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

s = H * W

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

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

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

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

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

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

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


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

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

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


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

print(ans)


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


print(ans)
Buggy code:
def main():
    h, w = map(int, input().split())

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


if __name__ == '__main__':
    main()


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

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


if __name__ == '__main__':
    main()
Buggy code:
H,W=map(int, input().split())

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

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

x = h*w

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

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

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

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

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

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

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


Fixed code:
h, w = map(int, input().split())
if w == 1 or h == 1:
	print(1)
else:
	print(((h + 1) // 2) * ((w + 1) // 2) + (h // 2) * (w // 2))
Buggy code:
datas = input().split(" ")

h = int(datas[0])
w = int(datas[1])


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

Fixed code:
datas = input().split(" ")

h = int(datas[0])
w = int(datas[1])


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

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


Fixed code:
h, w = map(int, input().split())
ans = (h * w + 1) // 2
if h == 1 or w == 1:
    ans = 1
print(ans)
Buggy code:
import math

h, w = input().split()

h, w = int(h), int(w)

if (h == 1) or (w == 1):
  print(1)
else:
  print(math.ceil(max([h, w]) / 2) * math.ceil(min([h, w]) / 2) + (max([h, w]) // 2) * min([h, w]) // 2)

Fixed code:
import math

h, w = input().split()

h, w = int(h), int(w)

if (h == 1) or (w == 1):
  print(1)
else:
  print(math.ceil(max([h, w]) / 2) * math.ceil(min([h, w]) / 2) + math.floor(max([h, w]) / 2) * math.floor(min([h, w]) / 2))
Buggy code:
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W 
elif H==1 or W==1:
    print(1)
elif x%2==0:
    print(x//2)
else:
    print((x+1)//2)

Fixed code:
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W 
if H==1 or W==1:
    print(1)
elif x%2==0:
    print(x//2)
else:
    print((x+1)//2)
Buggy code:
import sys
def input():
    return sys.stdin.readline()[:-1]
H,W = map(int,input().split(' '))
A = -(-W//2)
if W==1 or H==1:
    print(1)
    exit()
if H%2==0:
    print(W*H//2)
else:
    print(A)
    print(W*(H-1)//2+A)

Fixed code:
import sys
def input():
    return sys.stdin.readline()[:-1]
H,W = map(int,input().split(' '))
A = -(-W//2)
if W==1 or H==1:
    print(1)
    exit()
if H%2==0:
    print(W*H//2)
else:
    print(W*(H-1)//2+A)
Buggy code:
a, b = map(int,input().split())

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

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

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

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

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

if h ==1 or w==1:
    print(1)
elif h%2 == 1 and w%2==1:
    print(((h+1)//2)*w-w//2)
elif h%2 ==0:
    print((h//2) * w)
else:
    print((w//2) * h)
Buggy code:
import math

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



Fixed code:
import math

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

count = 0
if y % 2 == 0:
	count = x * (y // 2)
elif y == 1
	count = 1
else:
	count = x * ((y + 1) // 2) - (x // 2)

print(count)

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

count = 0
if y == 1 or x == 1:
	count = 1
elif y % 2 == 0:
	count = x * (y // 2)
else:
	count = x * ((y + 1) // 2) - (x // 2)

print(count)
Buggy code:
h,w = map(int,input().split())

if h % 2 == 0:
    h = h // 2
else:
    h = h // 2 + 1

if w % 2 == 0:
    w = w // 2
else:
    w = w // 2 + 1

print(h * w)

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

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

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

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


Fixed code:
H,W=map(int,input().split())
if H == 1:
  print(1)
elif W == 1:
  print(1)
elif H %2 == 0:
  print(W * H//2)
else:
  print(W * (H//2) + (W+1)//2)
Buggy code:
h,w=map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    m = math.ceil(w/2) * math.ceil(h/2) + math.floor(w/2) * math.floor(h/2)
    print(m)

Fixed code:
from math import floor,ceil
h,w=map(int,input().split())
if h == 1 or w == 1:
    print(1)
else:
    m =ceil(w/2) * ceil(h/2) + floor(w/2) * floor(h/2)
    print(m)
Buggy code:
H, W = [int(i) for i in input().split()]

if W % 2 == 0:
    print((H * W) // 2)
else :
    odd_row = (W // 2) + 1 
    even_row = W // 2
    if H % 2 == 1:
        odd_row_num = (H // 2) + 1
        even_row_num = H // 2
        print((odd_row*odd_row_num) + (even_row*even_row_num))
    else :
        print(((odd_row+even_row) * (H // 2))

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

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

ans = 0 

ans += H//2*W

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

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

ans = 0 

ans += H//2*W

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

Fixed code:
a,b=map(int,input().split())
if a==1 or b==1:
    print (1)
else:
    print (((a*b)+1)//2)
Buggy code:
import math
h, w = map(int, input().split())

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


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

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


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

if H==1 or W==1:
    print(1)
else:
    print((H*W+1)//2)
Buggy code:
def inpl():
    return list(map(int, input().split()))


HW = inpl()
HW.sort()
if HW[0] == 1:
    print(1)
    exit()
print(HW[0] * HW[1] // 2 + int(H[0] % 2 == 1 and H[1] % 2 == 1))


Fixed code:
def inpl():
    return list(map(int, input().split()))


HW = inpl()
HW.sort()
if HW[0] == 1:
    print(1)
    exit()
print(HW[0] * HW[1] // 2 + int(HW[0] % 2 == 1 and HW[1] % 2 == 1))
Buggy code:
a,b=map(int, input().split())
if a = 1 or b = 1:
  print(1)
else:
print(-(-1 * a * b // 2))

Fixed code:
a,b=map(int, input().split())
if a == 1 or b == 1:
	print(1)
else:
	print(-(-1 * a * b // 2))
Buggy code:
H,W = map(int,input().split())
if (H*W)%2== 0:
	print(long(H*W/2))
else:
	print(long((H*W)//2+1))

Fixed code:
H,W = map(int,input().split())
if H==1 or W==1:
    print(1)
else:
    if H%2==0 or W%2==0:
        print(H*W//2)
    else:
        print(H*W//2+1)
Buggy code:
# coding: utf-8
from math import ceil
H, W = map(int, input().split())
if H == 1 or W == 1:
    print(0)
    exit()
ans = 0
ans += ceil(W / 2) * ceil(H / 2)
ans += W // 2 * H // 2
print(ans)
print(ceil((H * W) / 2))

Fixed code:
# coding: utf-8
from math import ceil
H, W = map(int, input().split())
if H == 1 or W == 1:
    print(1)
else:
    ans = 0
    ans += ceil(W / 2) * ceil(H / 2)
    ans += (W // 2) * (H // 2)
    print(ans)
Buggy code:
h,w = map(int,input().split())
ans = (h*w)/2
if h%2 == 1 and w%2 == 1: ans += 1
print(ans)

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

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

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


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

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


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

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


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

Fixed code:
H,W=map(int,input().split())
if H==1 or W==1:
	print(1)
else:
	print((H*W+1)//2)
Buggy code:
def resolve():
    H, W = list(map(int, input().split()))
    ans = 0
    if (H == 1 and W == 1):
        print(1)
        return
    if H % 2 == 1:
        even = (H // 2) + 1
    else:
        even = (H // 2)

    odd = H - even

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

    ans += odd * (W // 2)

    print(ans)

    return

Fixed code:
def resolve():
    H, W = list(map(int, input().split()))
    ans = 0
    if (H == 1 or W == 1):
        print(1)
        return
    if H % 2 == 1:
        even = (H // 2) + 1
    else:
        even = (H // 2)

    odd = H - even

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

    ans += odd * (W // 2)

    print(ans)

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

Fixed code:
h,w=map(int,input().split())
result = h*w
if h==1 or w==1:
    print(1)
elif result%2==0:
    print(int(result//2))
else:
    print(int(result//2)+1)
Buggy code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == '__main__':
    main()


Fixed code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == '__main__':
    main()
Buggy code:
h,w = map(int,input().split())
tot = h*w
if h%2 == 0 or w%2 == 0:
  print(tot/2)
else:
  print((tot//2)+1)

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


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

hw=h*w

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

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

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

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

if H == 1 or W == 1:
  return 1
else:
  cnt = (H * W + 1) // 2
  return cnt

Fixed code:
H,W = map(int,input().split())
 
if H == 1 or W == 1:
  print(1)
else:
  cnt = (H * W + 1) // 2
  print(cnt)
Buggy code:
h,w =  map(int, input().split())

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

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

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

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


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

Fixed code:
h, w = map(int, input().split())
if h==1 or w==1:
    print(1)
elif h%2 ==0 or w%2==0:
    print(w*h//2)
else:
    print(w*(h//2)+(w+1)//2)
Buggy code:
n, m = (int(x) for x in input().split())
if n % 2 == 0:
  ans = n * m / 2
else:
  if m % 2==0:
    ans = ((n / 2 + 1) + n / 2) * m / 2
  else:
    ans = ((n / 2 + 1) + n / 2) * (m-1) / 2 + n / 2 + 1
print(ans)


Fixed code:
n, m = (int(x) for x in input().split())

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