Luke is daydreaming in Math class. He has a sheet of graph paper with $n$ rows and $m$ columns, and he imagines that there is an army base in each cell for a total of $n\cdot m$ bases. He wants to drop supplies at strategic points on the sheet, marking each drop point with a red dot. If a base contains at least one package inside or on top of its border fence, then it's considered to be supplied. For example:

Given $n$ and $m$, what's the minimum number of packages that Luke must drop to supply all of his bases?  

Example 

$n=2$ 

$m=3$  

Packages can be dropped at the corner between cells (0, 0), (0, 1), (1, 0) and (1, 1) to supply ${4}$ bases.  Another package can be dropped at a border between (0, 2) and (1, 2).  This supplies all bases using $2$ packages.  

Function Description  

Complete the gameWithCells function in the editor below.  

gameWithCells has the following parameters:  

int n: the number of rows in the game  
int m: the number of columns in the game  

Returns  

int: the minimum number of packages required  

Input Format

Two space-separated integers describing the respective values of $n$ and $m$.

Constraints

$0<n,m\leq1000$  

Sample Input 0
2 2

Sample Output 0
1

Explanation 0

Luke has four bases in a $2\times2$ grid. If he drops a single package where the walls of all four bases intersect, then those four cells can access the package:

Because he managed to supply all four bases with a single supply drop, we print ${1}$ as our answer.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n + 1) // 2 * ((m + 1) // 2))


from math import ceil
import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(int(ceil(n / 2) * ceil(m / 2)))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
num = (n // 2 + (n % 2 > 0)) * (m // 2 + (m % 2 > 0))
print(num)


from math import ceil
import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(ceil(n / 2) * ceil(m / 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n) + 1, int(m) + 1]
print(int(m / 2) * int(n / 2))


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(n / 2) * math.ceil(m / 2))


import sys
from math import *
(n, m) = input().strip().split(' ')
(n, m) = [float(n), float(m)]
print(int(ceil(n / 2) * ceil(m / 2)))


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
d1 = math.ceil(n / 2)
d2 = math.ceil(m / 2)
print(d1 * d2)


import math
import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(int(math.ceil(n / 2)) * int(math.ceil(m / 2)))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
result = (n // 2 + n % 2) * (m // 2 + m % 2)
print(result)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
rows = (n + 1) // 2
cols = (m + 1) // 2
print(rows * cols)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
(c, r) = (m // 2, n // 2)
if n % 2 > 0:
	r = r + 1
if m % 2 > 0:
	c = c + 1
print(c * r)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
(ndiv, nmod) = divmod(n, 2)
(mdiv, mmod) = divmod(m, 2)
total = ndiv * mdiv
if nmod == 1 and mmod == 1:
	total += ndiv + mdiv + 1
elif nmod == 1:
	total += mdiv
elif mmod == 1:
	total += ndiv
print(total)


(n, m) = (int(x) for x in input().split())
ans = (m // 2 + (m & 1)) * (n // 2 + (n & 1))
print(ans)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 0:
	n = n / 2
else:
	n = n // 2 + 1
if m % 2 == 0:
	m = m / 2
else:
	m = m // 2 + 1
print(int(m * n))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
answer = int((n + 1) / 2) * int((m + 1) / 2)
print(answer)


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(n / 2) * math.ceil(m / 2))


(n, m) = map(int, input().split())
a = n // 2 * (m // 2)
b = (n & 1) * m + (m & 1) * n + 1 >> 1
print(a + b)


import sys, math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(n / 2) * math.ceil(m / 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n + 1) // 2 * ((m + 1) // 2))


import sys
import time
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n // 2 + n % 2) * (m // 2 + m % 2))


line = input().strip().split(' ')
n = int(line[0])
m = int(line[1])
if n % 2 != 0:
	n += 1
if m % 2 != 0:
	m += 1
print(n * m // 4)


import math
(n, m) = [int(x) for x in input().strip().split()]
if n % 2 == 1:
	n += 1
if m % 2 == 1:
	m += 1
print(math.ceil(n * m / 4))


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


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


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
result = n // 2 * (m // 2)
if n % 2:
	result += m // 2
if m % 2:
	result += n // 2
if n % 2 and m % 2:
	result += 1
print(result)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]

def calc(n, m):
	effective_n = n // 2 + n % 2
	effective_m = m // 2 + m % 2
	return effective_n * effective_m
print(calc(n, m))


(n, m) = [int(x) for x in input().split()]
if n <= 2 and m <= 2:
	print(1)
else:
	t = 0
	c = 0
	while t < m:
		t += 1
		if t % 2 != 0:
			c += 1
	t = 0
	cc = 0
	while t < n:
		t += 1
		if t % 2 != 0:
			cc += 1
	print(c * cc)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
t = 0
for i in range(1, n + 1, 2):
	for j in range(1, m + 1, 2):
		t += 1
print(t)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(((n - 1) // 2 + 1) * ((m - 1) // 2 + 1))


(n, m) = [int(x) for x in input().split()]
if n % 2 != 0:
	n += 1
if m % 2 != 0:
	m += 1
print(m * n // 4)


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.floor(n / 2 + 0.5) * math.floor(m / 2 + 0.5))


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]

def calc(n, m):
	return math.ceil(n / 2) * math.ceil(m / 2)
print(calc(n, m))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]

def f(a):
	return int(a / 2) + a % 2
print(f(n) * f(m))


import math
(n, m) = map(int, input().split())
result = math.ceil(n / 2) * math.ceil(m / 2)
print(result)


import sys
(n, m) = input().strip().split(' ')
(n, m) = (int(n), int(m))
(nP, mP, total) = (0, 0, 0)
if n == 0 or m == 0:
	total = 0
else:
	if n % 2 == 0:
		nP = int(n / 2)
	else:
		nP = int((n + 1) / 2)
	if m % 2 == 0:
		mP = int(m / 2)
	else:
		mP = int((m + 1) / 2)
	total = mP * nP
print(total)


import sys
import math

def round_up_to_even(f):
	return math.ceil(f / 2.0) * 2
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
(n, m) = [round_up_to_even(n), round_up_to_even(m)]
print(math.ceil(n * m / 4))


(n, m) = map(int, input().split())
(nd, nm) = divmod(n, 2)
(md, mm) = divmod(m, 2)
s = nd * md
if nm:
	s += md
if mm:
	s += nd
if nm and mm:
	s += 1
print(s)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 1:
	n += 1
if m % 2 == 1:
	m += 1
print(m * n // 4)


from math import ceil
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n == 1 and m == 1:
	print(1)
else:
	print(ceil(n / 2) * ceil(m / 2))


import sys
(n, m) = map(int, input().strip().split(' '))
x = n % 2
n = n // 2
y = m % 2
m = m // 2
print(x * y + x * m + y * n + m * n)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
dots = 0
if n % 2 == 0:
	dots = n // 2
else:
	dots = n // 2 + 1
if m % 2 == 0:
	dots = dots * (m // 2)
else:
	dots = dots * (m // 2 + 1)
print(int(dots))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 0 and m % 2 == 0:
	print(n // 2 * m // 2)
elif n % 2 == 0 and m % 2 != 0:
	print(n // 2 * (m // 2) + n // 2)
elif n % 2 != 0 and m % 2 != 0:
	print(n // 2 * (m // 2) + n // 2 + m // 2 + 1)
else:
	print(m // 2 * (n // 2) + m // 2)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(((n - 1) // 2 + 1) * ((m - 1) // 2 + 1))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 != 0:
	n += 1
if m % 2 != 0:
	m += 1
print('{0:.0f}'.format(n * m / 4))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 1:
	n += 1
if m % 2 == 1:
	m += 1
print(n // 2 * (m // 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n // 2 + (n % 2 > 0)) * (m // 2 + (m % 2 > 0)))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n + 1) // 2 * ((m + 1) // 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 0:
	if m % 2 == 0:
		print(n // 2 * (m // 2))
	else:
		print(n // 2 * ((m - 1) // 2) + n // 2)
elif m % 2 == 0:
	print((n - 1) // 2 * (m // 2) + m // 2)
else:
	print((n - 1) // 2 * ((m - 1) // 2) + m // 2 + n // 2 + 1)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 0 and m % 2 == 0:
	print(n * m // 4)
elif n % 2 != 0 and m % 2 == 0:
	print((n + 1) * m // 4)
elif n % 2 == 0 and m % 2 != 0:
	print(n * (m + 1) // 4)
else:
	print((n + 1) * (m + 1) // 4)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(int((int(n / 2) + n % 2) * (int(m / 2) + m % 2)))


(n, m) = map(int, input().split())
_2x2_bases = n // 2 * (m // 2)
if n % 2 != 0 and m % 2 != 0:
	extras = n // 2 + 1 + (m // 2 + 1) - 1
elif n % 2 == 0 and m % 2 != 0 or (m % 2 == 0 and n % 2 != 0):
	extras = (n // 2 if n % 2 == 0 else 0) + (m // 2 if m % 2 == 0 else 0)
else:
	extras = 0
print(_2x2_bases + extras if n and m != 0 else 0)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n + 1 >> 1) * (m + 1 >> 1))


(n, m) = [int(i) for i in input().split()]
print((n // 2 + n % 2) * (m // 2 + m % 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(int((n + 1) / 2) * int((m + 1) / 2))


def eo(x):
	if x % 2 == 0:
		return x / 2
	else:
		return (x - 1) / 2 + 1
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n <= 1000 and m <= 1000 and (n > 0) and (m > 0):
	np = int(eo(n))
	mp = int(eo(m))
	min_package = np * mp
	print(min_package)


import sys

def optimal_drop(low, high):
	return low // 2 * (high // 2)
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
s = 0
highest = max([n, m])
lowest = min([n, m])
if highest == 0 or lowest == 0:
	print(0)
	sys.exit(0)
if highest % 2 == 0 and lowest % 2 == 0:
	print(optimal_drop(lowest, highest))
elif highest % 2 != 0 or lowest % 2 != 0:
	if highest % 2 == 0:
		print(optimal_drop(lowest + 1, highest))
	elif lowest % 2 == 0:
		print(optimal_drop(lowest, highest + 1))
	else:
		print(optimal_drop(lowest + 1, highest + 1))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n + 1) // 2 * ((m + 1) // 2))


(n, m) = list(map(int, input().split()))
(big, small) = (max(n, m), min(n, m))
b = 1
s = 1
if big % 2 == 0:
	b = big // 2
else:
	b = big // 2 + 1
if small % 2 == 0:
	s = small // 2
else:
	s = small // 2 + 1
print(b * s)


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(int(math.ceil(n / 2) * math.ceil(m / 2)))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
cn = cm = 0
cn = int(n / 2)
if n % 2 != 0:
	cn = cn + 1
cm = int(m / 2)
if m % 2 != 0:
	cm = cm + 1
print(cn * cm)


(n, m) = (int(x) for x in input().strip().split(' '))
print((n + 1) // 2 * ((m + 1) // 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n == 1:
	print(int((m + 1) / 2))
elif m == 1:
	print(int((n + 1) / 2))
else:
	x = int((n + 1) / 2) * int((m + 1) / 2)
	print(x)


import sys

def minSupply(n, m):
	np = n - n % 2
	mp = m - m % 2
	t = np * mp // 4
	if mp != m:
		t += n // 2
	if np != n:
		t += m // 2
	if np != n and mp != m:
		t += 1
	return t
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(minSupply(n, m))


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


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
supply = 0
if n % 2 == 0:
	if m % 2 == 0:
		supply = n // 2 * (m // 2)
	else:
		supply = n // 2 * (m // 2) + n // 2
elif m % 2 == 0:
	supply = n // 2 * (m // 2) + m // 2
else:
	supply = n // 2 * (m // 2) + n // 2 + m // 2 + 1
print(supply)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 0:
	if m % 2 == 0:
		count = m * n // 4
	else:
		count = (m - 1) * n // 4 + n // 2
elif m % 2 == 0:
	count = m * (n - 1) // 4 + m // 2
elif m % 2 != 0:
	count = (m - 1) * (n - 1) // 4 + n // 2 + 1 + m // 2
print(count)


(n, m) = input().strip().split()
(n, m) = [int(n), int(m)]
j = (m + 1) // 2
i = (n + 1) // 2
print(i * j)


import sys
(n, m) = map(int, input().strip().split(' '))
remainder_h = m & 1
remainder_v = n & 1
result = (m >> 1) * (n >> 1)
if m & 1:
	result += n >> 1
if n & 1:
	result += m >> 1
if m & 1 and n & 1:
	result += 1
print(result)


(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((m // 2 + m % 2) * (n // 2 + n % 2))


from math import ceil
import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(ceil(n / 2) * ceil(m / 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((n + 1) // 2 * ((m + 1) // 2))


import sys
(n, m) = map(int, input().strip().split(' '))
(n, m) = (min(n, m), max(n, m))
print((n + 1 >> 1) * (m + 1 >> 1))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
x1 = n // 2
x2 = m // 2
x = x1 * x2
x1 = n % 2
x2 = m % 2
if x1:
	x += m // 2
if x2:
	x += n // 2
if x1 and x2:
	x += 1
print(x)


(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
(x, y) = (n // 2 * 2, m // 2 * 2)
if n % 2 == 1 and m % 2 == 1:
	print(x * y // 4 + abs((x - n) * m // 2 + (y - m) * n // 2) - 1)
else:
	print(x * y // 4 + abs((x - n) * m // 2 + (y - m) * n // 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(n // 2 * (m // 2) + n % 2 * (m // 2) + m % 2 * (n // 2) + n % 2 * (m % 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 == 0:
	if m % 2 == 0:
		print(n * m // 4)
	else:
		print(n * (m - 1) // 4 + n // 2)
elif m % 2 == 0:
	print((n - 1) * m // 4 + m // 2)
else:
	print((n - 1) * (m - 1) // 4 + (n - 1) // 2 + (m - 1) // 2 + 1)


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


import sys
l = [int(x) for x in input().strip().split(' ')]

def army_game(l):
	large = max(l)
	small = min(l)
	tc = large * small
	count = 0
	if tc < 4:
		if tc == 1:
			count = 1
		else:
			count = tc // 2 + tc % 2
		print(count)
	else:
		if small == 1:
			count = large // 2
			if large % 2 == 1:
				count += 1
		else:
			al = large - large % 2
			asm = small - small % 2
			mul = al * asm
			c = mul // 4
			b = tc - mul
			c += b // 2
			if b % 2 == 1:
				c += 1
			count = c
		print(count)
army_game(l)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]

def solve(n, m):
	total = 0
	total += n // 2 * (m // 2)
	if n % 2 != 0 and m % 2 != 0:
		total += (n - 1) // 2 + m // 2 + 1
	elif n % 2 != 0 and m % 2 == 0:
		total += m // 2
	elif n % 2 == 0 and m % 2 != 0:
		total += n // 2
	return total
print(solve(n, m))


import sys
from math import *
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(ceil(n / 2) * ceil(m / 2))


import sys
import math
sol = 0
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
sol = int(math.ceil(n / 2) * math.ceil(m / 2))
print(sol)


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(n / 2) * math.ceil(m / 2))


import sys
a = input().split()
n = int(a[0])
m = int(a[1])
d = int(n / 2)
c = int(m / 2)
e = n % 2 * m
f = m % 2 * n
t = 1
if e == 0 or f == 0:
	t = 0
g = int(e / 2)
h = int(f / 2)
ans = c * d + g + h + t
print(ans)


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(n / 2) * math.ceil(m / 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
sm = min(n, m)
lar = max(n, m)
ans = 0
if sm >= 0:
	ans = sm // 2 * (lar // 2)
	ec = n * m - 4 * ans
	if sm % 2 == 0 and lar % 2 != 0:
		ans = ans + ec // 2 + ec % 2
	elif lar % 2 == 0 and sm % 2 != 0:
		ans = ans + ec // 2 + ec % 2
	elif lar % 2 != 0 and sm % 2 != 0:
		ans = ans + 1 + (lar - 2) // 2 + (lar - 2) % 2 + (sm - 2) // 2 + (sm - 2) % 2
print(int(ans))


from math import ceil
import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(ceil(n / 2) * ceil(m / 2))


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


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(n / 2) * math.ceil(m / 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 != 0:
	n += 1
if m % 2 != 0:
	m += 1
print(n * m // 4)


import sys

def solve(n, m):
	return (n + 1) // 2 * ((m + 1) // 2)

def main(inp=sys.stdin):
	(n, m) = [int(x) for x in inp.readline().strip().split(' ')]
	print(solve(n, m))
main()


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print((m + 1) // 2 * ((n + 1) // 2))


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
x = int(math.ceil(n / 2))
y = int(math.ceil(m / 2))
print(x * y)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n == 1:
	a = 1
else:
	a = (n + 1) // 2
if m == 1:
	b = 1
else:
	b = (m + 1) // 2
if m == 0:
	print(0)
else:
	print(a * b)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 != 0:
	n = int(n / 2) + 1
else:
	n = n // 2
if m % 2 != 0:
	m = int(m / 2) + 1
else:
	m = m // 2
print(n * m)


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n == 0 and m == 1:
	a = 1
if n == 1 and m == 0:
	a = 1
if n % 2 != 0:
	n = n + 1
if m % 2 != 0:
	m = m + 1
a = n * m / 4
print(int(a))


params = input().strip().split(' ')
n = int(params[0])
m = int(params[1])
n += n % 2
m += m % 2
print(n * m // 4)


from math import ceil
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(ceil(n / 2) * ceil(m / 2))


import sys
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
if n % 2 != 0:
	n += 1
if m % 2 != 0:
	m += 1
print(n * m // 4)


import sys
import math
(n, m) = input().strip().split(' ')
(n, m) = [int(n), int(m)]
print(math.ceil(m / 2) * math.ceil(n / 2))