d = int(input()) a, b = map(int, input().split()) ans = 0 for x in range(0, d + 1): tmp = x * a + (d - x) * b if x == 0 or ans > tmp: ans = tmp print(ans)