from heapq import heapify, heappop, heappush n = int(input()) c, v = map(int, input().split()) H = [(c, 1, 1)] INF = 10**18 DP = [INF for _ in range(n + 1)] DP[1] = c heapify(H) while H: cost, num, c_num = heappop(H) if num >= n: print(cost) break if c_num != num: if cost + c + v < DP[min(num * 2, n)]: DP[min(num * 2, n)] = cost + c + v heappush(H, (cost + c + v, num * 2, num)) if cost + v < DP[min(num + c_num, n)]: DP[min(num + c_num, n)] = cost + v heappush(H, (cost + v, num + c_num, c_num))