#include #include #include #include using namespace std; int main() { int a, b, c, d; int e=0; cin >> d; cin >> a >> b; for (int i = 0; i <=d; i++) { c = i * a + (d - i) * b; e = c; e = min(e, c); } cout << e << endl; return 0; }