d = int(input().strip()) a, b = map(int, input().strip().split(' ')) print(min([a * i + b * (d - i) for i in range(0, d+1, d)]))