#include using namespace std; int main() { int d, a, b; cin >> d >> a >> b; int ans = 1 << 30; for(int x=0;x<=d;x++) { ans = min(ans, x * a + (d - x) * b); } cout << ans << endl; }