#C1467. Maximum Number of Rooms

    ID: 44344 Type: Default 1000ms 256MiB

Maximum Number of Rooms

Maximum Number of Rooms

You are given two positive integers m and n representing the dimensions of a grid. Your task is to determine the maximum number of rooms that can be built under the condition that no two adjacent rooms share a wall. This configuration is achieved by arranging the rooms in a checkerboard pattern.

The answer is given by the formula:

$$ \left\lceil \frac{m \times n}{2} \right\rceil $$

In other words, if you multiply the dimensions to get the total number of cells, then the maximum number of rooms is the ceiling of half that product.

inputFormat

The input consists of a single line containing two space-separated integers m and n (1 ≤ m, n ≤ 109), representing the number of rows and columns of the grid respectively.

outputFormat

Output a single integer — the maximum number of rooms that can be built in the grid, computed using the formula:

$$ \left\lceil \frac{m \times n}{2} \right\rceil $$

## sample
4 4
8