# 2次元dp # dp[i番目][0 for -1, 1 for 1]での最小値 N, A, B = map(int, input().split()) INF = 10**12 dp = [[INF]*2 for i in range(N)] dp[0][0] = B dp[0][1] = -B for i in range(1, N): dp[i][0] = min(dp[i-1][0]+A+B, dp[i-1][1]-A+B) dp[i][1] = min(dp[i-1][0]-A-B, dp[i-1][1]+A-B) #print(dp[i]) ans = min(dp[N-1]) print(ans)