d = int(input()) a,b = map(int,input().split()) min_val = 1000*1000 for x in range(0,d+1): if x*a+(d-x)*b