Problem E
Polypleating
Languages
en
is
Gunnar works at a laundromat where he and his co-workers get really bored at work. In order to entertain themselves they decide to compete in towel folding, a competition where the victor is determined by who has the thickest towel. Unfortunately, they do not have any measuring tools. To make the competition as objective and fair as possible they require a program that will act as a judge. The purpose of the judge is to determine the thickness of a towel after being folded. You may assume that towels are $1\text{mm}$ thick originally.
Input
Input consists of two lines. The first line contains one integer $n$, how many layers the towel is folded in to on the long side. The second line contains one integer $m$, how many layers the towel is folded in to on the short side.
Output
The new height after folding it together.
Scoring
|
Groups |
Points |
Constraints |
|
1 |
100 |
$0 \leq m \leq n \leq 10\, 000$ |
Explanation of samples
In the first sample, the towel is folded into $4$ layers on the long side and $3$ layers on the short side.
| Sample Input 1 | Sample Output 1 |
|---|---|
4 3 |
12 |
| Sample Input 2 | Sample Output 2 |
|---|---|
6 7 |
42 |
| Sample Input 3 | Sample Output 3 |
|---|---|
1 1 |
1 |
