Suppose you are stuck on a desert island. The only way to save yourself is to craft a wooden raft and go to the sea. Fortunately, you have a hand-made saw and a forest nearby. Moreover, you've already cut several trees and prepared it to the point that now you have
The wooden raft you'd like to build has the following structure: 2 logs of length
You can cut logs into pieces but you can't merge two logs into one. What is the maximum area of the raft you can craft?
The first line contains a single integer
The second line contains
It's guaranteed that you can always craft at least a
Print a single integer — the maximum area of the raft you can craft.
Subtask # | Score | Constraints |
---|---|---|
1 | 12 | |
2 | 12 | |
3 | 12 | All |
4 | 64 | No additional constraints |
Sample Input 1 | Sample Output 1 |
1
|
4
|
In the first example, you can cut the log of length
Sample Input 2 | Sample Output 2 |
9
|
90
|
In the second example, you can cut
Subtask | Score |
---|---|
1 | 12 |
2 | 12 |
3 | 12 |
4 | 64 |
5 | 0 |