Recently the fruit market started testing a new price policy. After buying an apple from a merchant, the price for that merchant’s next apples is increased by 1.

Today Vasya and Petya are the only merchants selling apples, they are selling their first apple for prices *a* and *b* rubles respectively. Due to the constant supply, the amount of apples for sale is virtually unlimited.

After finding out about the new price policy, Masha went to the market early in the morning to buy *N* apples. She is the first in the queue, and she is wondering what’s the minimal amount of rubles required to buy the necessary number of apples.

### Input

The first line contains one integer *N* (1 ≤ *N* ≤ 10^{9}) — the number of apples that Masha is going to buy.

The second line contains one integer *a* (1 ≤ *a* ≤ 10^{9}) — the price of Vasya’s first apple.

The third line contains one integer *b* (1 ≤ *b* ≤ 10^{9}) — the price of Petya’s first apple.

### Output

Output one integer — the minimal amount of rubles that Masha could spend on *N* apples.

### Samples

input | output |
---|

5
4
7 | 29 |

6
4
7 | 37 |

100
1
1000 | 5050 |

**Problem Author: **Valentin Zuev, prepared by Daniil Zheludkov