plan
题号:NC17436
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

There are n students going to travel. And hotel has two types room:double room and triple room. The price of a double room is p2 and the price of a triple room is p3

Now you need to calulate the minimum total cost of these students.

输入描述:

The first line has three integers n, p2, p3

输出描述:

Output the minimum total cost.
示例1

输入

复制
4 2 3

输出

复制
4
示例2

输入

复制
5 1 3

输出

复制
3

备注:

1<=n<=10^9

1<=p2,p3<=10^9