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