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