#include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int d, a, b, x; cin >> d >> a >> b; if (a <= b) x = d; else x = 0; cout << x * a + (d - x) * b << endl; }