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