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