d = int(input()) a, b = map(int, input().split()) ans = 10 ** 19 for i in range(d + 1): ans = min(ans, i * a + (d - i) * b) print(ans)