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