Problem:
 Score : 400 points    Problem Statement Snuke has one biscuit and zero Japanese yen (the currency) in his pocket.
He will perform the following operations exactly K times in total, in the order he likes:   Hit his pocket, which magically increases the number of biscuits by one.  Exchange A biscuits to 1 yen.  Exchange 1 yen to B biscuits.   Find the maximum possible number of biscuits in Snuke's pocket after K operations.      Constraints  1 \leq K,A,B \leq 10^9  K,A and B are integers.         Input Input is given from Standard Input in the following format:  K  A  B       Output Print the maximum possible number of biscuits in Snuke's pocket after K operations.        Sample Input 1 4 2 6      Sample Output 1 7  The number of biscuits in Snuke's pocket after K operations is maximized as follows:   Hit his pocket. Now he has 2 biscuits and 0 yen.  Exchange 2 biscuits to 1 yen. his pocket. Now he has 0 biscuits and 1 yen.  Hit his pocket. Now he has 1 biscuits and 1 yen.  Exchange 1 yen to 6 biscuits. his pocket. Now he has 7 biscuits and 0 yen.        Sample Input 2 7 3 4      Sample Output 2 8       Sample Input 3 314159265 35897932 384626433      Sample Output 3 48518828981938099

Solution (Python):
k,a,b = map(int,input().split())
if a + 2 >= b:
  print(k+1)
else:
  print(a + ((k - a + 1) // 2) * (b - a) + (k - a + 1) % 2)

Solution (Python):
K,A,B=map(int,input().split())

if B-A<=2:
    print(K+1)
else:
    if A<K:
        print((K-(A-1))//2*(B-A)+A+(K-(A-1))%2)
    else:
        print(K+1)

Solution (Python):
k, a, b = map(int, input().split())
ans = k + 1
if a <= k:
  ans2 = a
  k -= a - 1
  if k % 2 == 1:
    ans2 += 1
  ans2 += (b - a) * (k // 2)
print(max(ans, ans2))

Solution (Python):
k, a, b = map(int, input().split())

if a + 1 >= b:
  print(1 + k)
  
else:
  if k < a + 1:
    print(1 + k)
  else:
    
    a1 = b 
    if (k - (a + 1)) % 2 == 0:
      a2 = ((k - (a + 1)) // 2) * (b - a)
    else:
      a2 = ((k - (a + 1) - 1) // 2) * (b - a) + 1
    print(a1 + a2)

Solution (Python):
k, a, b = map(int, input().split())
k += 1

if a + 3 <= b:
    x = 0
    k -= (a+2)
    x += b

    n, res = divmod(k, 2)
    x += (b-a)*n+res
    print(x)
else:
    print(k)

Solution (Python):
K, A, B = map(int, input().split())
if A+2 > B:
  print(K+1)
else:
  print(A+max(0, (K-A+1)//2)*(B-A)+(K-A+1)%2)

Solution (Python):
k,a,b=map(int,input().split())
ans=1
if a+2>=b or a>=k:
  ans=k+1
else:
  k-=a-1
  ans+=a-1
  ans+=(k//2)*(b-a)
  if k%2==1:
    ans+=1
print(ans)

Solution (Python):
k,a,b=map(int,input().split())

if k<=a: print(1+k)
else:
    print(max(1+k, b+(k-a-1)//2*(b-a) + (k-a-1)%2))

Solution (Python):
def main():
    k, a, b = input_list()

    
    
    if b - a > 2:
        
        bis = a
        k -= a - 1
        
        if k % 2 == 1:
            bis += 1
            k -= 1
        bis += (k//2) * (b-a)
        print(bis)
    else:
        print(k+1)

def input_list():
    return map(int, input().split())

if __name__ == "__main__":
    main()

Solution (Python):
k, a, b = map(int,input().split())

if b-a <= 2:
    print(k+1)
else:
    ans = a
    k -= a-1
    if k%2 == 0:
        ans += (b-a)*(k//2)
    else:
        ans += (b-a)*(k//2)
        ans += 1
    print(ans)

Solution (Python):
k,a,b=map(int,input().split())
print(max(a+(b-a)*((k-a+1)//2)+(k-a+1)%2,1+k))

Solution (Python):



import collections
import bisect
import math
import fractions
import collections
import itertools
from functools import reduce

def main():
    k, a, b = input_list()
    if b - a > 2:
        bis = a
        k -= a - 1
        if k % 2 == 1:
            bis += 1
            k -= 1
        bis += (k//2)*(b-a)
        print(bis)
    else:
        print(k+1)


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


if __name__ == '__main__':
    main()

Solution (Python):
K, A, B = map(int, input().split())
ans = 0
if B - A <= 2:
  print(K + 1)

else:
  K -= A - 1
  ans += (K//2) * (B - A) + A
  ans += K % 2
  print(ans)

Solution (Python):
K, A, B = map(int, input().split())
ans = 0
if B - A <= 2:
  print(K + 1)

else:
  K -= A - 1
  ans += (K//2) * (B - A) + A
  ans += K % 2
  print(ans)

Solution (Python):
k, a, b = map(int, input().split())

if a + 2 >= b:
    print(k + 1)
elif k <= a - 1:
    print(k + 1)
else:
    remain = k - (a - 1)
    d, m = divmod(remain, 2)
    ans = a + (b - a) * d + m
    print(ans)

Solution (Python):
k,a,b=map(int,input().split())

num=b-a
ans=0

if num <= 2:
  print(1+k)
else:
  ans=(a-1)
  k-=(a-1)
  s=k//2
  l=k%2
  ans=s*num+l+a
  print(ans)

Solution (Python):
k,a,b=map(int,input().split())
cnt=0
bis=1
yen=0
if b-a<3 or a>=k: print(1+k); exit()
if a>1:
  bis=a
  cnt=a-1
if k-cnt>1:
  bis=bis+(b-a)*((k-cnt)//2)
  if (k-cnt)%2==1: bis+=1
print(bis)

Solution (Python):
K, A, B = map(int, input().split())
if A+2 >= B or A >= K:
  print(K+1)
else:
  print(B + ((K-A+1)//2-1)*(B-A) + ((K-A+1)%2))

Solution (Python):
k, a, b = map(int, input().split())
n = min(a - 1, k) + 1
k -= (n - 1)
if a + 2 <= b:
    n += (k // 2) * (b - a)
    n += k % 2
else:
    n += k
print(n)

Solution (Python):
k, a, b = map(int, input().split())
if b-1 <= a:
    print(1 + k)
else:
    k -= a-1
    cnt = a
    if k%2 == 1:
        cnt += 1
        k -= 1
    cnt += (b-a) * k//2
    print(cnt)

Solution (Python):
K,A,B = map(int,input().split())
if A+2 >= B:
    print(1+K)
else:
    beatC,m = divmod((K - (A-1)),2)
    print(beatC*(B-A)+(K - 2 * beatC)+1)

Solution (Python):
k, a, b = map(int, input().split())
if 2 >= b-a  or a >= k:
    print(k+1)

else:
    print(b + ((k-a+1)//2-1)*(b-a) + ((k-a+1)%2))

Solution (Python):
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)

K,A,B = mint()

if B-A<2:
    print(K+1)
elif K<=A-1:
    print(K+1)
else:
    K -= A-1
    print(A+(B-A)*(K//2)+(K%2))

Solution (Python):
k,a,b=map(int,input().split())
t=a
ans=k+1
k-=a-1
t+=(b-a)*(k//2)
if k%2==0:
  ans=max(ans,t)
else:
  ans=max(ans,t+1)
print(ans)

Solution (Python):
K,A,B=map(int,input().split())

if A+2>=B or K-1<A:
    print(1+K)
else:
    if (K-A+1)%2==0:
        print(A+((K-A+1)//2)*(B-A))
    else:
        print(A+((K-A+1)//2)*(B-A)+1)

Solution (Python):
import sys, math
from functools import lru_cache
from collections import defaultdict, Counter
import bisect
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    K, A, B = mi()

    if B <= A+2:
        print(K+1)
        return

    x = max(0, (K-(A-1))//2)
    y = K-2*x

    print((B-A)*x+y+1)
    

if __name__ == '__main__':
    main()

Solution (Python):
def cin():  return list(map(int,input().split()))
K, A, B = cin()
ans1 = K + 1
kk = K - (A - 1)
ans2 = 0
if kk > 0:
    if kk % 2:  ans2 = A + 1 + kk // 2 * (B - A)
    else:  ans2 = A + kk // 2 * (B - A)
ans = max(ans1, ans2)
print(ans)

Solution (Python):
k,a,b=map(int,input().split())

if a+1<b:
    ans=0
    if k<=a:
        ans=k+1
    else:
        ans=(a-1)+1
        k-=(a-1)
        if k%2==0:
            
            ans+=(k//2)*(b-a)
        else:
            
            ans+=(k//2)*(b-a)+1


    print(ans)


else:
    print(1+k)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    K, A, B = [int(x) for x in input().split()]

    if B - A <= 2 or K <= A:
        print(K + 1)
        return
    ans = A
    K -= (A - 1)
    ans += (K // 2) * (B - A)
    ans += K % 2
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
K,A,B = map(int,input().split())

if A + 2 > B:
    print(K + 1)
    exit()

start = A - 1
K -= start
ans = K//2 * (B-A) + K%2 + start + 1
print(ans)

Solution (Python):

K,A,B = map(int,input().split())

if B <= A:
    ans = K + 1
else:
    nock = A - 1 + 2
    lest = K - nock
    ans = B + (lest//2)*(B-A) + (lest%2)*1
    ans = max(K+1,ans)
print(ans)

Solution (Python):
k,a,b = map(int,input().split())
if b - a <= 1 or a >= k:
    print(k+1)
else:
    k -= a - 1
    ans = a
    ans += (b - a)*(k//2)
    if k % 2 != 0:
        ans += 1
    print(ans)

Solution (Python):
def f(k,a,b,t):
	if k == 0:
		return t
	

	if t >= a:
		if b-a > 2 and k >= 2:
			return f(k%2, a,b,t + k/2 * (b-a))
		else:
			return f(0, a, b, t + k)
	else:
		dist=  a-t
		return f(k-min(k,dist), a, b, t + min(k,dist))

k,a,b = map(int, raw_input().split())
print f(k,a,b,1)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    K, A, B = MI()

    ans = 1
    if (B-A) <= 2:
        ans += K
    else:
        sa = A - ans
        K -= sa
        ans = A
        p, q = K // 2, K % 2
        ans += (B-A) * p + q
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

k,a,b=nii()

num=1
if b-a<=1:
  print(num+k)
  exit()

if num<a:
  k-=a-num
  num+=a-num

cnt=k//2
if k%2==0:
  num+=(b-a)*cnt
else:
  num+=(b-a)*cnt+1

print(num)

Solution (Python):

import sys



def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    k, a, b = input_int_list()
    if b - a <= 2:  
        ans = k + 1
    else:
        exchange, mod = divmod((k - (a - 1)), 2)
        ans = a
        ans += exchange * (b - a)
        ans += mod
    print(ans)

    return


if __name__ == "__main__":
    main()

Solution (Python):
K,A,B = map(int,input().split())

if B-A < 3:
    print(K+1)
else:
    if A > K-1:
        print(K+1)
    else:
        count = K-A+1
        shou = count//2
        if count%2 == 1:
            print(A+(B-A)*shou+1)
        else:
            print(A+(B-A)*shou)

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

K,A,B = MI()

if B-A <= 2 or K <= A-1:
    print(1+K)
else:
    K -= A-1
    print(A+(B-A)*(K//2) + K % 2)

Solution (Python):
def LI():
    return list(map(int, input().split()))


K, A, B = LI()
if A+2 >= B:
    ans = K+1
else:
    K = K-(A-1)
    nokori = K % 2
    ans = A+(B-A)*(K//2)
    ans += nokori


print(ans)

Solution (Python):
k,a,b=map(int,input().split())
if a+1>=b:
    print(k+1)
    exit()
c=k-a+1
if c%2==0:
    print(max(k+1,a+(c//2)*(b-a)))
else:
    print(max(k+1,(c//2)*(b-a)+a+1))

Solution (Python):
k,a,b=map(int,input().split())
if b-a==0:
  print(k+1)
  exit()
if b-a<0:
  print(k+1)
  exit()

if k-(a-1)<=0:
  print(k+1)
  exit()
  
  
ans=k+1
k-=(a-1)

now=a
if k%2==1:
  now+=1
  k-=1
now=now+(b-a)*(k//2)
ans=max(now,ans)

print(ans)

Solution (Python):
K, A, B = map(int, input().split())
if A >= B-1:
    print(K+1)
else:
    if K <= A-1:
        print(K+1)
    else:
        K -= A-1
        print(A + (B-A)*(K//2) + [1,0][K%2 == 0])

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

K, A, B = mapint()
if (B-A)/2<=1:
    print(K+1)
else:
    cnt = A
    rest = K - cnt + 1
    if rest<2:
        print(K+1)
    else:
        if rest%2==0:
            print(cnt+(B-A)*rest//2)
        else:
            rest -= 1
            cnt += 1
            print(cnt+(B-A)*rest//2)

Solution (Python):
K,A,B = map(int,input().split())
if B-A-2 <= 0:
  print(K+1)
  exit()

if K-1 < A:
  print(K+1)
  exit()
  
K -= (A-1)
num = K//2
nokori = K%2

ans = A+num*(B-A)+nokori
print(ans)

Solution (Python):
import sys

K, A, B = map(int, sys.stdin.readline().split())

if K + 1 < A:
    print(K+1)
else:
    if A + 2 < B:
        
        n = K - (A - 1)
        r = n // 2
        
        print(A + r * (B - A) + n % 2)
            
    else:
        print(K+1)

Solution (Python):
k, a, b = map(int, input().split())

if a + 2 > b or k < a:
    print(k + 1)
else:
    k -= (a - 1)
    have = a
    div, mod = divmod(k, 2)
    print((b - a) * div + a + mod)

Solution (Python):
k, a, b = map(int, input().split())

if k <= a - 1 or a + 1 >= b:
    print(k + 1)
    exit()
k -= a - 1

print(a + k // 2 * (b - a) + k % 2)

Solution (Python):
k,a,b=map(int,input().split())


bisket=1

cnt=a-bisket

if cnt>k:
    print(1+k)
    exit(0)

k-=cnt
bisket+=cnt

if a+2<=b:
    trade=k//2
    k-=trade*2
    
    bisket+=trade*(b-a)

    if k==1:
        bisket+=1
    
    print(bisket)


else:
    print(bisket+k)

Solution (Python):
K,A,B = map(int,input().split())
if B-A<=2:
    print(1+K)
else:
    if K<=A-1:
        print(1+K)
    else:
        d = K-(A-1)
        if d==1:
            print(A+1)
        elif d%2==0:
            print(B+((d-2)//2)*(B-A))
        else:
            print(B+((d-3)//2)*(B-A)+1)

Solution (Python):
K,A,B = map(int,input().split())
if A+1 >= B:
    print(K+1)
else:
    if K < A-2:
        print(K+1)
    else:
        K -= A-1
        chance = K//2
        ans = 0
        ans += chance*(B-A)+A
        spare = K%2
        ans += spare
        print(ans)

Solution (Python):
k,a,b = map(int, input().split())

if a > b-2:
    print(k+1)
else:
    if k < a-1:
        print(k+1)
    else:
        rem = k-(a-1)
        if rem%2 == 0:
            cnt = rem//2
            ans = a+(b-a)*cnt
            print(ans)
        else:
            cnt = rem//2
            ans = a+(b-a)*cnt
            ans += 1
            print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  

K,A,B = MI()

if B-A <= 2:
    print(1+K)
else:
    if K <= A-1:
        print(1+K)
    else:
        K -= A-1
        ans = A
        ans += (B-A)*(K//2) + K % 2
        print(ans)

Solution (Python):
k,a,b=map(int,input().split())
if a+1<b:
    if a-1+2>k:
        print(1+k)
    else:
        num1=a-1+2
        num2=b-a
        print(b+((k-num1)//2)*num2+(k-num1)%2)
else:
    print(1+k)

Solution (Python):
K, A, B = map(int, input().split())

x = (K - (A - 1)) // 2 * (B - A) + A
if (K - (A - 1)) % 2 != 0:
    x += 1

print(max(x, K + 1))

Solution (Python):
K, A, B = map(int, input().split())

if B - A <= 2:
    print(K + 1)
    exit()

x = (K - (A - 1)) // 2 * (B - A) + A
if (K - (A - 1)) % 2 != 0:
    x += 1

print(max(x, K + 1))

Solution (Python):
K,A,B=map(int,input().split())

if B-A<=2:
  print(K+1)
else:
  need_init=A-1
  if need_init>=K:
    print(K+1)
  else:
    K-=need_init
    answer=A
    
    answer+=(B-A)*(K//2)
    if K%2==0:
      print(answer)
    else:
      print(answer+1)

Solution (Python):
k,a,b = map(int,input().split())
ans = 1
if a+2 > b:
    ans += k
else:
    ans += min(k,a-1)
    k -= ans-1
    ans += k//2*(b-a)+k%2
print(ans)

Solution (Python):
k,a,b=map(int,input().split())
ans=1
yen=0
if b<=a+2 or k<=a:
    ans+=k
else:
    n=(k-a+1)//2
    ans+=n*(b-a)+(k-2*n)
print(ans)

Solution (Python):
K, A, B = map(int, input().split())
if B - A <= 2 or K - A < 1:
    ans = 1 + K
else:
    ans = 1
    K -= A - 1
    ans += A - 1
    if K % 2 == 0:
        ans += (B - A) * (K // 2)
    else:
        K -= 1
        ans += 1 + (B - A) * (K // 2)
print(ans)

Solution (Python):
K,A,B= map(int, input().split())

if A + 2 >= B:
    print(K + 1)

else:
    K -= A - 1
    q, m = divmod(K, 2)
    print((B - A) * q + A + m)

Solution (Python):
K, A, B = map(int, input().split())
ans = 1
ans += min(K, A-1)
K -= min(K, A-1)
if K == 0:
    print(ans)
elif B-A > 2:
    if K % 2 == 0:
        print(ans + (B-A) * K // 2)
    else:
        print(ans + (B-A) * (K-1) // 2 + 1)
else:
    print(ans+K)

Solution (Python):
k,a,b = map(int,input().split())
ans = -1

if b-a<3:
    ans = k+1
else:
    if k<a+1:
        ans = k+1
    else:
        ope = k-(a-1)
        ope_ab = ope//2
        ans = ope_ab*b - (ope_ab-1)*a + ope % 2
        ans = int(ans)

print(ans)

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

k, a, b = map(int, input().split())
k += 1
cnt =  k - (a + 2)

if b - a > 2 and cnt >= 0:
    ans = b + (b - a)*(cnt//2) + cnt%2
else:
    ans = k

print(ans)

Solution (Python):
k, a, b = map(int, input().split())
k += 1
cnt =  k - (a + 2)

if b - a > 2 and cnt >= 0:
    ans = b + (b - a)*(cnt//2) + cnt%2
else:
    ans = k

print(ans)

Solution (Python):
import sys
k,bisc_to_yen,yen_to_bisc = map(int,input().split())
if yen_to_bisc - bisc_to_yen <= 2 or k-1 < bisc_to_yen:
    print(k+1)
    sys.exit()
before_change = bisc_to_yen - 1
remain = k - before_change
num_change = remain//2
ans = num_change*(yen_to_bisc-bisc_to_yen)
if remain % 2 == 1:
    ans += 1
print(ans+bisc_to_yen)

Solution (Python):
k, a, b = map(int, input().split())

if a >= b:
    print(k + 1)
else:
    d = b-a
    if k < a or d // 2 <= 1:
        print(k + 1)
    else:
        t = k - (a - 1)
        print(a + t//2 * d + t % 2)

Solution (Python):
k, a, b = map(int, input().split())
n = 1
m = 0
n += a - 1
k -= a - 1
if a + 1 < b:
  n += (b - a) * (k // 2) + k % 2
else:
  n += k
print(n)

Solution (Python):
k, a, b = map(int, input().split())
n = 1
m = 0
n += a - 1
k -= a - 1
if a + 1 < b:
  n += (b - a) * (k // 2) + k % 2
else:
  n += k
print(n)

Solution (Python):
k,a,b = map(int,input().split())
cokie = 1
if b < a:
    cokie += k
    print(cokie)
else:
    if k < a-1 or b-a < 2:
        cokie += k
        print(cokie)
    else:
        cokie += a-1
        k -= a-1
        b_a = k//2
        hit = k%2
        cokie += b_a*(b-a) + hit 
        print(cokie)

Solution (Python):
K, A, B = map(int, input().split())

bisc = 1
yen = 0

ans = K + 1

if A >= B:
    print(ans)
    exit()

now = A
K -= (A - 1)
now += (K // 2) * (B - A)
K = K % 2
now += K
print(max(now, ans))

Solution (Python):
K,A,B = map(int, input().split())
if B - A < 3:
    print(1+K)
else:
    if K - (A-1) < 2:
        print(1+K)
    else:
        K -= A-1
        if K%2 == 0:
            print((B-A)*K//2 + A)
        else:
            print((B-A)*(K-1)//2 + A + 1)

Solution (Python):
k, a, b = map(int, input().split())
if k <= a or b - a <= 2:
    ans = 1 + k
elif b - a > 2:
    ans = ((k - a + 1) // 2) * (b - a) + a + (k - a + 1) % 2
print(ans)

Solution (Python):
k, a, b = map(int,input().split())
ans = 1

if b-a < 3 or a >= k:
    ans += k
else:
    ans += (a-1)
    k -= (a-1)
    tmp = k//2
    k -= 2*tmp
    ans += ((b-a)*tmp) + k%2

print(ans)

Solution (Python):
k,a,b=map(int,input().split())
if k==1:
    print(2)
    exit()
if b-a<=2:
    print(k+1)
    exit()
if k<=a:
    print(k+1)
    exit()
k-=a-1
ans=a
t=k//2
ans+=(b-a)*t
k-=t*2
ans+=k
print(ans)

Solution (Python):
K,A,B=map(int,input().split())

if (B-A)/2>1 and K>=A+1:
    print(A+(B-A)*((K-A+1)//2)+(K-A+1)%2)
else:
    print(K+1)

Solution (Python):
k, a, b = list(map(int, input().split()))

ans = 1
if b >= a+3:
    if k >= a+1:
        ans += b-1

        ans += (b-a)*((k-(a+1))//2)
        ans += (k-(a+1)) % 2
    else:
        ans += k
else:
    ans += k

print(ans)

Solution (Python):
k, a, b = map(int, input().split())

ans = 0
if b - a < 2:
  ans = k + 1
else:
  ans = a
  k -= a - 1
  ans += (b - a) * (k // 2) + k % 2

print(ans)

Solution (Python):
k , a, b = map(int, input().split())

ans = 0

if b-a <= 2:
    ans = k+1
else:
    ans  = a
    k -= a - 1
    ans += (b-a) * (k//2) + k % 2

print(ans)

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


k,a,b = list(map(int, input().split()))
c = 1
if b<=a+2:
    ans = c + k
else:
    if k<=(a-c):
        ans = c + k
    else:
        c = a
        k -= (a-1)
        ans = c + (b-a)*(k//2)
        if k%2==1:
            ans += 1
print(ans)

Solution (Python):
K, A, B = map(int, input().split())

if B-A <= 2:
  ans = K+1
else:
  ans = A
  n = (K-A+1) // 2
  ans += (B-A) * n
  if (K-A+1) % 2 == 1:
    ans += 1
print(ans)

Solution (Python):

 

 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 

 










 
K,A,B=map(int, input().split())

if B<=A+2:
    print(K+1)
else:
    if K < A-1:
        print(K+1)
    else:
        K = K - (A-1)
        N = A
        if K%2==0:
            N += K//2 * (B-A)
        else:
            N += K//2 * (B-A) + 1
        print(N)

Solution (Python):
k, a, b = map(int, input().split())

if b - a <= 2 or k-(a-1) <= 0:
    ans = 1 + k
else:
    k = k - (a-1)
    n = k // 2
    ans = (n-1) * (b-a) + b + (k-2*n)
print(ans)

Solution (Python):
k, a, b = map(int, input().split()) 
biscet = 1

rate = (b-a)/2

if ( rate > 1):
    k-=(a-1)
    biscet+=(a-1)
    biscet += int(k/2) * (b-a)
    biscet += k%2
    
else:
    biscet += k    

print(biscet)

Solution (Python):
k, a, b = map(int, input().split())

if b - a <= 2: print(k + 1)
else:
    if k < a + 1: print(k + 1)
    else:
        q, r = divmod(k - a + 1, 2)
        print(a + q * (b - a) + r)

Solution (Python):
k, a, b = map(int, input().split())

if b - a <= 2:
    print(k + 1)
else:
    tmp = (k - a + 1) // 2
    ans = a + (b - a) * tmp
    if (k - a + 1) % 2 == 1:
        ans += 1
    print(ans)

Solution (Python):
import sys,math,collections,itertools
input = sys.stdin.readline
cnt =1
K,A,B=list(map(int,input().split()))
if A+2<=B:
    if A-1 >=K:
      cnt = 1+K
    else:
        cnt = A + (K-(A-1))//2*(B-A)+(K-(A-1))%2
else:
    cnt = 1+K
print(cnt)

Solution (Python):
import sys


INF = 10**60
inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

k, a, b = inintm()
ans = 0

if a + 2 >= b:
    print(1+k)
else:
    ch = max(0, (k-(a-1))//2)
    print(b + (ch-1)*(b-a) + k-(ch*2+a-1))

Solution (Python):
K,A,B = map(int,input().split())
if B-A <= 2:
    print(1+K)
    exit()
time = K - A + 1
print(A + time//2*(B-A) + time%2)

Solution (Python):

k, a, b = map(int, input().split())
if k < a + 1 or 2 > b - a:
    print(k + 1)
else:
    print((k - a + 1) // 2 * (b - a) + a + (k - a + 1) % 2)

Solution (Python):
K,A,B=map(int,input().split())
if A>=B-2:
    ans=1+K
else:
    if K<=A-1:
        ans=1+K
    else:
        bis=A
        if (K-(A-1))%2==0:
            ans=(B-A)*((K-(A-1))//2)+A
        else:
            ans=(B-A)*((K-(A-1))//2)+1+A
print(ans)

Solution (Python):
k,a,b = map(int,input().split())
if a >= b or a + 2 >= b:
    print(k+1)
else:
    if k+1 <= a:
        print(k+1)
    else:
        k = k-a+1
        c = k%2
        d = k//2
        print(a+(b-a)*d+c)

Solution (Python):
k, a, b = map(int, input().split())
diff = b - a
if diff <= 2:
    print(1 + k)
    exit()
times = a - 1
print(a + (k-times) // 2 * diff + (k-times) % 2)

Solution (Python):
k,a,b = map(int,input().split())
ans = 0
if a+1 < b:
    k -= a-1
    if k%2 == 1:
        ans = k//2 * b + - (k//2 - 1) * a + 1
    else:
        ans = k//2 * b - (k//2 - 1) * a
else:
    ans = k+1
print(ans)

Solution (Python):
k, a, b = map(int, input().split())

total = 1
cost = b/(a + 1)

if cost > 1:
    if k >= a - 1:
        n = (k - (a - 1)) // 2
        total += n * (b - a)
        total += k - 2 * n
    else:
        total += k
else:
    total += k

print(total)

Solution (Python):

k, a, b = map(int, input().split())
if k < a + 1 or 2 > b - a:
    print(k + 1)
else:
    print((k - a + 1) // 2 * (b - a) + a + (k - a + 1) % 2)

Solution (Python):

import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

k,a,b = map(int,readline().split())

if b-a <= 2:
    print(k+1)
    exit()

res = max(0,(k-(a-1))//2)

ans = a+res*(b-a)

if not even(k-(a-1)):
    ans += 1

print(ans)

Solution (Python):
k, a, b = map(int, input().split())

ans = 0
if a >= b:
  ans = k+1
else:
  if b - a <= 2:
    ans = k+1
  else:
    if k < (a-1)+2:
      ans = k+1
    else:
      ans = b
      k -= (a-1)+2
      ans += (b-a)*(k//2)
      if k%2 == 1:
        ans += 1
print (ans)

Solution (Python):
K, A, B = [int(_) for _ in input().split()]

if B - A <= 2 or K <= A:
    print(K + 1)
else:
    ans = (K - A + 1) % 2
    N = (K - A + 1) // 2 - 1
    ans += B + (B-A) * N
    print(ans)

Solution (Python):
K, A, B = map(int, input().split())
if B - A <= 2  or K <= A:
  print(K + 1)
else:
  print(A + ((K - A + 1) // 2) * (B - A)  + ((K - A + 1) % 2))

Solution (Python):
K, A, B = list(map(int, input().split()))
if A >= B - 1 or A + 1 > K:
    res = K + 1
else:
    K -= A + 1
    t = int(K / 2)
    res = (t + 1) * B - t * A + K % 2
print(res)

Solution (Python):
k, a, b = map(int, input().split())

if k < a:
    ans = k + 1

else:
    if b <= a + 2:
        ans = k + 1

    else:
        k -= a - 1
        q, r = divmod(k, 2)
        ans = a + q * (b - a) + r

print(ans)

Solution (Python):
K,A,B=map(int,input().split())
q,r=divmod(K-A+1,2)
print(max(A+q*(B-A)+r,K+1))

Solution (Python):
K, A, B = map(int, input().split())

if(B-A <= 2):
    print(K+1)
else:
    m = max(0, (K-(A-1))//2)*(B-A)+(K+1)-2*max(0, (K-(A-1))//2)
    print(m)

Solution (Python):
K, A, B = map(int, input().split())

if B-1 <= A:
    print(K+1)
    exit()

count = max(0, (K - (A-1))//2)
ans = (K+1) - 2*count + (B-A)*count
print(ans)

Solution (Python):
k, a, b = map(int, input().split())
q, r = divmod(k-a+1, 2)
print(max(q*(b-a) + r + a, k+1))

Solution (Python):
K,A,B=map(int,input().split())
if A+2>=B:
    print(K+1)
elif K<=A:
    print(K+1)
else:
    K-=A-1
    k=K//2
    print(B*k-A*(k-1)+K%2)

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')
k, a, b = LI()


if b - a <= 2:
    print(1 + k)
    exit()

rest_k = k - (a - 1)  
if rest_k < 0:
    ans = 1 + k  
else:
    ans = a
    
    ans += (b - a) * (rest_k // 2)
    ans += rest_k % 2  
print(ans)

Solution (Python):
k, a, b = map(int, input().split())
bis = 1
if b - a <= 2:
    bis += k
else:
    while k != 0:
        if bis >= a and k >= 2:
            bis += b - a
            k -= 2
        else:
            bis += 1
            k -= 1
print(bis)

Solution (Python):
K,A,B = map(int, open(0).read().split())
if B - A <= 1:
    print(K+1)
else:
    if K < A + 1:
        print(K+1)
    else:
        dm = divmod(K-A-1,2)
        print((dm[0]*(B-A)+B+dm[1]))

Solution (Python):
def main():
    k, a, b = list(map(int, input().split()))
    if b - a <= 2:
        print(k + 1)
    else:
        c = max(0, (k - (a - 1)) // 2)
        print((b - a) * c + k - 2 * c + 1)


if __name__ == '__main__':
    main()

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial





def solve():
    k, a, b = [int(x) for x in input().split()]
    if b - a > 2:
        
        
        
        ops = k - a + 1
        print(max(k + 1, (b - a) * (ops // 2) + a + (ops % 2)))

    else:
        print(k + 1)

t = 1

for case in range(1,t+1):
    ans = solve()


"""

1 + k



"""

Solution (Python):
k,a,b=map(int,input().split())
ans=0
k+=1
if a+2>b:
    ans=k
else:
    if a+2>k:
        ans=k
    else:
        ans+=b
        k-=a+2
        ans+=(b-a)*(k//2)
        ans+=k%2
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def check(k,ans):
    if k<2:
        print(ans+k)
        exit()

def main():
    k,a,b=MI()
    d=b-a
    if d<3:
        print(k+1)
        exit()
    ans=1
    cnt=min(a-1,k)
    ans+=cnt
    k-=cnt
    check(k,ans)
    cnt=k//2
    ans+=cnt*d
    k-=cnt*2
    check(k,ans)

main()

Solution (Python):
K, A, B = map(int, input().split())

if B - A <= 2:
    print(K + 1)
else:
    ans = 0
    
    rest = K - A + 1
    
    ans += A
    
    ans += rest // 2 * (B - A)
    if rest % 2 != 0:
        ans += 1
    print(ans)

Solution (Python):
K, A, B = map(int, input().split())
if B - A > 2:
  ans = max(B + ((K - (A + 1)) // 2) * (B - A) + (K - (A + 1)) % 2, K + 1)
else:
  ans = K + 1
  
print(ans)

Solution (Python):
def f():
    K, A, B = map(int, input().split())

    if A+1 >= B:
        print(K+1)
        return

    if K <= A:
        print(K+1)
        return

    res = A

    K -= A-1
    if K % 2 == 1:
        res += 1
        K -= 1

    res += (K//2) * (B-A)
    
    print(res)
    return

f()

Solution (Python):
from collections import defaultdict
from collections import deque
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

k,a,b = readInts()

if a+1<=k and a+2<b:
	k-=a+1
	ans=k//2*(b-a)+k%2+b
else:
	ans = k+1

print(ans)

Solution (Python):
def resolve():
    '''
    code here
    '''
    K, A, B = [int(item) for item in input().split()]

    if B - A > 1:
        num = K - (A - 1)
        print(num//2 * (B-A) + num%2 + A)
    else:
        print(1 + K)


if __name__ == "__main__":
    resolve()

Solution (Python):






K,A,B = map(int, input().split())





if A >= B-2:
    bisc = K+1
else:
    n = (K-A+1)//2
    bisc = 1+K-2*n+(B-A)*n
print(bisc)