d = int(input()) a,b = map(int,input().split()) min_v = 10**18 for x in range(0,d+1): if min_v > x*a + (d-x)*b: min_v = x*a + (d-x)*b print(min_v)