eolymp
bolt
Try our new interface for solving problems
Problems

Chocolate lover

Chocolate lover

Aziz is very fond of eating chocolate. But since chocolate is very bad for teeth, his father won't let him eat a lot of chocolate. This time he managed to convince his father and get permission to eat one chocolate every day. Aziz loves two types of chocolate. One weighs $a$ grams, the other $b$ grams. Aziz's father allowed him to eat one chocolate every day for $n$ days, but with condition that he should not eat the same chocolate for two days in a row. Now Aziz is worried about only one question. How to make sure that within $n$ days he could eat the maximum amount (in grams) of chocolate. Help him with this. \InputFile One line contains three integers $n, a$ and $b~(1 \le n, a, b \le 10^9)$. \OutputFile Print the maximum amount of chocolate (in grams) that Aziz can consume during $n$ days.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1 10 8
Output example #1
10
Input example #2
3 1 2
Output example #2
5
Source 2019 Azerbaijan National Olympiad, Finals 5 May