#include int main(void) { int d, a, b, minCost, cost; scanf("%d", &d); scanf("%d%d", &a, &b); minCost = d * b; for (int x = 0; x <= d; x++) { cost = x * a + (d - x)*b; if (minCost > cost) { minCost = cost; } } printf("%d", minCost); return(0); }