d = int(input()) a = int(input()) b = int(input()) x = 1 while x * a + (d - x) * b >= (x + 1) * a + (d - x - 1) * b: x += 1 print(x * a + (d - x) * b)