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