#K92492. Maximum Transplants
Maximum Transplants
Maximum Transplants
You are given an integer N
representing the size of a square grid (an N x N
grid). You need to determine the maximum number of transplants that can be planted in the grid such that no two transplants have overlapping roots.
It is guaranteed that when a transplant is planted in a cell, its root system prevents another transplant from being planted in the adjacent cells in a way that they would overlap. After careful observation, you can deduce that the maximum number of transplants that can be planted follows the formula:
$$\lceil N/2 \rceil$$
Given this, your task is to output the maximum number of transplants for a given N
.
inputFormat
The input consists of a single integer N
(1 \le N \le 10^9
), which is provided via standard input.
outputFormat
Output a single integer representing the maximum number of transplants that can be planted on the grid, computed as \lceil N/2 \rceil
.
1
1