Black Squares
An N×M board is colored like a chessboard with the top-left cell BLACK. How many black cells are there?
Input: one line with two integers N and M.
Output: ⌈N·M / 2⌉.
Constraints:
- 1 ≤ N, M ≤ 109
Sample Tests
Input 1
3 3
Output 1
5
Input 2
2 2
Output 2
2
Discussion (opens after you solve — no spoilers before)
No comments yet.