d = int(input()) a, b = map(int, input().split()) p = 10**9 for x in range(d+1): p = min(p, x * a + (d - x) * b) print(p)