from heapq import * N = int(input()) C, V = map(int, input().split()) INF = 10 ** 8 D = [INF] * (N + 1) D[1] = 0 Q = [(C + V, 2, 1)] D[2] = C + V while Q: cost, i, cb = heappop(Q) if D[min(N, i + cb)] > cost + V: D[min(N, i + cb)] = cost + V if N > i + cb: heappush(Q, (D[i + cb], i + cb, cb)) if D[min(N, 2 * i)] > cost + C + V: D[min(N, 2 * i)] = cost + C + V if N > 2 * i: heappush(Q, (D[2 * i], 2 * i, i)) print(D[N])