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