d = int(input()) a, b = map(int, input().split()) for x in range(d+1): n = ([x*a + (d-x)*b]) m = min(n) print(m)