Container
View as PDFAttempt
Please login to see your submissions result.
Last updated: on Dec. 25, 2024, 3:23 a.m.
Problem
In the modern era, with the explosion of fast delivery services, users can now place international orders from home without spending too much time.
With this rapid growth, the logistics industry needs to transport increasingly larger volumes of goods over time to keep up with users's order demands. This necessitates the combined use of both air and sea freight. The drawback of sea transportation is that it is slower than air transport but can handle massive cargo volumes in a single shipment, reaching thousands of tons, and making transport easier with the use of containers.
It is predicted that by the year 2105, all tools currently operated by humans will become fully automated, eliminating the need for manual control. Robotic container-lifting arms will be no exception. In the future, these robotic arms will need to know the length and width of the cargo space on the cargo ship, denoted by ~N~ and ~M~ units, respectively, to calculate how many ways containers can be loaded onto the cargo space. Each container occupies 2 units of area, can be placed at the edges of the cargo space, and no containers may be placed upright to occupy 1 unit of area or stacked on top of each other. Please answer the problem, what is maximum 2x1 container can be placed on the cargo space by the robot arm.
Input
Only a single line contains two positive integer ~N~ and ~M~ is the length and width of the cargo space.
Output
Print a single line with positive integer is the answer of the problem.
Constraints
~1 \leq N, M \leq 10^9~.
Sample
| Sample Input | Sample Output |
|---|---|
|
2 4
|
4
|
|
3 3
|
4
|
|
3 6
|
9
|
Comments