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