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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if total%2 == 0:
    print(total/2)
else:
    print(ceil(total/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:

def invr():
    return(map(int, input().split()))


h, w = invr()

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

Submission status: Wrong Answer

Solution code:

def invr():
    return(map(int, input().split()))


h, w = invr()

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

Submission status: Wrong Answer

Solution code:

def invr():
    return(map(int, input().split()))


h, w = invr()

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

Submission status: Wrong Answer

Solution code:
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

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

Submission status: Wrong Answer

Solution code:
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

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

print(ans)

Submission status: Wrong Answer

Solution code:
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

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

print(ans)

Submission status: Wrong Answer

Solution code:
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

h,w = readInts()
ans = 0
one = (w+1)//2
two = w//2
print(one*((h+1)//2)+two*(h//2))

Submission status: Wrong Answer

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

h1 = H//2
h2 = H-h1

w2 = W//2
w1 = W-w2


print(h2*w1+h1*w2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

H, W = list(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 = [int(i) for i in input().split()]
print(math.ceil(H * W / 2))

Submission status: Wrong Answer

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

hh = h%2
kk = k%2

if h == 1 or k == 1:
    ans = 1
elif hh == 0 and kk == 0:
    ans = int(h/2*k)
else:
    ans = int(h*k/2)+1

print(ans)

Submission status: Wrong Answer

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

hh = h%2
kk = k%2

hm = int(h/2)
km = int(k/2)

if h == 0 and k == 0:
    ans = 1
elif hh == 0 and kk == 0:
    ans = int(h/2*k)
else:
    ans = int(h*k/2)+1

print(ans)

Submission status: Wrong Answer

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



if x ==1 or y ==1:
  print(1)
  exit(0)
if x%2==0 or y%2==0:
  print(x*y/2)
  exit(0)
a=int(x*y/2)+1
print(a)

Submission status: Wrong Answer

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



if x ==1 or y ==1:
  print(1)
  exit(0)
if x%2==0 or y%2==0:
  print(x*y/2)
  exit(0)
print((x*y/2+1))

Submission status: Wrong Answer

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

hh = h%2
kk = k%2

hm = int(h/2)
km = int(k/2)

if (h == 1 and k <=2) or (h <= 2 and k == 1):
    ans = 1
elif hh == 0 and kk==0:
    ans = hm*k
elif hh == 1 and kk == 0:
    hm = 2*hm +1
    ans = hm*km
elif hh == 0 and kk == 1:
    ans = hm * k
elif hh == 1 and kk == 1:
    hhm = 2 * hm + 1
    ans = hhm * (km+1) - hm

print(ans)

Submission status: Wrong Answer

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

ans = math.ceil(H/2)*math.ceil(W/2) + math.floor(H/2)*math.floor(W/2)
print(ans)

Submission status: Wrong Answer

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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 = list(map(int, input().split()))

s = 0

if h % 2 == 1 and w % 2 == 1:
    s = h*w//2 + 1
else:
    s = h*w//2 

print(s)

Submission status: Wrong Answer

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

s = 0

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

print(s)

Submission status: Wrong Answer

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

s = 0

def kaku(h, w):
    if h % 2 == 1:
        return (w + 1) // 2 + kaku(h-1, w)
    elif w % 2 == 1:
        return h // 2 + kaku(h, w-1)
    else:
        return h*w //2

print(kaku(h,w))

Submission status: Wrong Answer

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

s = 0

def kaku(h, w):
    if h % 2 == 1:
        return (w + 1) // 2 + kaku(h-1, w)
    elif w % 2 == 1:
        return (h + 1) // 2 + kaku(h, w-1)
    else:
        return h*w //2

print(kaku(h,w))

Submission status: Wrong Answer

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

hh = h%2
kk = k%2

hm = int(h/2)
km = int(k/2)

if hh == 0 and kk==0:
    ans = hm*k
elif hh == 1 and kk == 0:
    hm = 2*hm +1
    ans = hm*km
elif hh == 0 and kk == 1:
    ans = hm * k
elif hh == 1 and kk == 1:
    hhm = 2 * hm + 1
    ans = hhm * (km+1) - hm

print(ans)

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*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())
t = w//2+(w%2!=0)
ans  = (t+w//2)*(h//2)+t*(h%2!=0)
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:
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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0
h,w = map(int,input().split())
neko = h%2
nya = w%2
nuko = h * w /2
if neko + nya == 2:
    nuko = nuko + 1
if h + w == 2:
    nuko = 1
print(int(nuko))

Submission status: Wrong Answer

Solution code:
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0
h,w = map(int,input().split())
neko = h%2
nya = w%2
nuko = ((h-neko)*(w-nya) + nya * (h-neko) + neko * (w-nya))/2
if neko + nya == 2:
    nuko = nuko + 1
if h + w == 2:
    nuko = 0
print(int(nuko))

Submission status: Wrong Answer

Solution code:
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0
h,w = map(int,input().split())
neko = h%2
nya = w%2
nuko = ((h-neko)*(w-nya) + nya * (h-neko) + neko * (w-nya))/2
if neko + nya == 2:
    nuko = nuko + 1

print(int(nuko))

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 = 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 = map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print((H * W)//2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0 

ans += H//2*W

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

Submission status: Wrong Answer

Solution code:
h,w = map(int, raw_input().split(' '))
def f(h,w):
	x = w - w/2
	y = w/2
	count = 0
	count += (h - h/2) * x
	count += (h/2) * y
	return count
print f(h,w)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

w1, w2 = W // 2, W % 2
h1, h2 = H // 2, H % 2

num = 2 * w1 * h1 + w2 * h1 + w1 * h2 + w2 * h2 
print(num)

Submission status: Wrong Answer

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

w1, w2 = W // 2, W % 2
h1, h2 = H // 2, H % 2

num = 2 * w1 * h1 + w2 * h1 + (w1+1) * h2 
print(num)

Submission status: Wrong Answer

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

w1, w2 = W // 2, W % 2
h1, h2 = H // 2, H % 2

print(h1, h2)
print(w1, w2)

num = 2 * w1 * h1 + w2 * h1 + (w1+1) * h2 
print(num)

Submission status: Wrong Answer

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

w1, w2 = int(W / 2), W % 2
h1, h2 = int(H / 2), H % 2

num = 2 * w1 * h1 + w2 * h1 + w1 * h2 
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def resolve():
  H, W = [int(i) for i in input().split()]
  print(math.ceil(H*W/2))
  
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


resolve()

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

Submission status: Wrong Answer

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

if (H*W) % 2 == 0:
  res = int(H * W / 2)
else:
  res =  int(H * (W//2) + int(H/2) + 1)
print('{0:d}'.format(res))