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):
import sys
K,A,B = map(int,input().split())

if (A >= B-1):
    print(K+1)
    sys.exit()
    
K2 = K
count = 1
while(K2 > 0):
    if count < A and K2 > (A-count):
        K2 -= (A-count)
        count = A
    else:
        if K2 >=2:
            nn = int(K2/2)
            K2 -= 2 * nn
            count += (B-A) * nn
            
        elif K2 == 1:
            count += 1
            K2 -= 1
        
        
print(count)

Solution (Python):

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


n = max(0, (K - A + 1))
ans = (
     min(K, A) + (B - A) * (n // 2) + n % 2 if B >= A + 3 else
     K + 1
)


print(ans)

Solution (Python):
k,a,b = (int(i) for i in input().split())

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

k -= a-1
n += a-1

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

Solution (Python):

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

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

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

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

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

Solution (Python):
k,a,b=map(int,input().split())
if (a+2)>b: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())
s=A
K-=A-1

if K>=2 and B-A>=2:
  t=K//2
  s+=t*(B-A)
  K-=t*2
  
s+=K
print(s)

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

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

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

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

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

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

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

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

    bis = a + max(b-a, 2) * int((k-a+1)/2) + (k-a+1)%2
        
    print(int(bis))

Solution (Python):
K, A, B = map(int, input().split())
if 0 <= A - B + 2:
  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 A >= B-2 or 1+K <= A:
  print(1+K)
  exit(0)

now = A
K -= A-1

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

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

if A > B - 2:
    print(K+1)
    sys.exit(0)

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


print(ans)

Solution (Python):
import sys

K, A, B = sys.stdin.readline().split(" ")
k = long(K)
a = long(A)
b = long(B)

if (b-a) >= 2:
	hitsteps = a - 1
	leftoversteps = k - hitsteps
	rem = (leftoversteps)%2
	swaps = (leftoversteps-rem)/2
	multbiscuits = swaps * (b-a)
	print(int(multbiscuits+rem+a))
else:
	print(int(k+1))

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

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


k+=1
k2=k-(a+2)
print(max(b+(b-a)*(k2//2)+k2%2,k))

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

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

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


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

else:
    ans = B
    K -= (A + 1)

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

Solution (Python):


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

Solution (Python):
import math


def solution(K, A, B):
    if A >= B - 2:
        return K + 1
    iterTmp = K - (A - 1)
    return math.floor(iterTmp / 2) * (B - A) + A + iterTmp % 2


if __name__ == "__main__":
    K, A, B = [int(s) for s in input().split(' ')]
    print(solution(K, A, B))

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

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

print(ans)

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

Solution (Python):
import math

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

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

print(x)

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


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

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

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

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

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

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

Solution (Python):
k, a, b = map(int, input().split())
count= 0
cookies = 1
if b-a <= 2:
    cookies = k+1
else:
    while count < k:
        if k - count <= 1:
            cookies += 1
            count +=1
        elif cookies >= a and k-count >= 2:
            cookies += (b - a)*((k-count)//2)
            count +=((k-count)//2)*2
        elif cookies < a:
            cookies += a-1
            count += a-1
print(cookies)

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

max_n = (K-A-1)//2
mod = (K-A-1)%2

if A+2 >= B:
  print(K+1)
elif K < A+1:
  print(K+1)
else:
  print(B+max_n*(B-A)+mod)

Solution (Python):
k,a,b = map(int,input().split())
coin = 0
i = 0
if b-1 > a and a-1 <= k :
    
    
    times = (k-a+1)//2
    
    times_hit = (k-a+1)%2

    
    coin = a + (b-a)*times+times_hit
    print(coin)
else:
    
    print(k+1)

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

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

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

if a + 1 >= b:
    print(k + p)
else:
    c = min(k, a - p)
    p += c
    k -= c
    if k == 0:
        print(p)
    else:
        p += (-a + b) * (k // 2)
        k = k % 2
    
    if k == 1:
        print(p + 1)
    else:
        print(p)

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

Solution (Python):
k,a,b=map(int,input().split())
if b-a <= 2 or k+1 < a:
    print(k+1)
else:
    q,mod=divmod(k+1-a,2)
    print(a+q*(b-a)+mod)

Solution (Python):
def f():
    a = list(map(int, input().split()))
    if a[0] <= a[1]:
        print(a[0]+1)
        return
    b = a[2]-a[1]
    print(((a[0]-a[1]+1)//2)*b+(a[0]-a[1]+1)%2+a[1] if b > 2 else a[0]+1)
f()

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

Solution (Python):

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

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

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

    kanekai=(k-(a+1))//2

    ans=kanekai*(b-a)+b
    if (k-(a+1))%2!=0:
        ans+=1
    return ans



print(mc())

Solution (Python):
k,a,b = (int(num) for num in input().split())
ans = 0
if a-b >= -2:
    ans = k+1
elif k <= a-1:
    ans = k+1
else:
    n_yen = (k-a+1)//2
    ans = k+1 - n_yen*2 + n_yen*(b-a)
print(ans)

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

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

print(biscuits)

Solution (Python):




def solveProblem(operation,bis2moneyone,onemoney2bis):
	if (onemoney2bis-bis2moneyone) <= 1:
		
		answer=operation+1
	else:
		
		answer = bis2moneyone
		
		remainOperation = operation - ( bis2moneyone - 1)
		
		changeMoney2Bis = remainOperation // 2
		
		answer = answer + changeMoney2Bis * ( onemoney2bis - bis2moneyone)
		
		answer = answer + remainOperation % 2

	return answer


if __name__ == '__main__':
	K,A,B = map(int,input().strip().split(' '))
	solution = solveProblem(K,A,B)
	print("{}".format(solution))

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

Solution (Python):
'''input
314159265 35897932 384626433
'''
import time
import math
k, a, b = map(int, input().strip().split())
if b > a + 2:
	ans = 1
	if(ans < a):
		ans += min(a - 1, k - 1)
		k -= min(a - 1, k - 1)
	if k % 2 == 1:
 		ans += 1
 		k -= 1
	ans = ans - (a * (k // 2))
	ans = ans + (b * (k // 2))
	print(ans)
else:
	ans = 1 + k
	print(ans)

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

if (B-A) < 3 :
    print(K+1)
else :
    print((B-A) * math.floor(max(0,(K+1-A)/2)) + A + (K+1-A)%2)

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

Solution (Python):
k,a,b=map(int,input().split(" "))
x=1
count=0
if a>b or b-a<2:
  print(k+1)
  exit()
if x<a and k-count>=a-x:
  count+=a-x
  x=a
c,ex=divmod((k-count),2)
x+=(b-a)*c
if ex==1:
  x+=1
print(int(x))

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

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

else:print(k+1)

Solution (Python):
k,a,b=(int(i) for i in input().split())

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

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

if b-a <= 2:
    biscuit += k
    print(biscuit)
else:
    if k <= a:
        biscuit += k
        print(biscuit)
    else:
        k -= a+1
        biscuit = b
        times = k//2
        reminder = k%2
        biscuit += times * (b-a) + reminder
        print(biscuit)

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

if b <= a or k < a or (b - a) / 2 < 1:
    print(k + 1)
    exit()
else:
    biscuit += (a - 1)
    k -= (a - 1)

print((b - a) * (k // 2) + biscuit + (k%2==1 &1))

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

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

Solution (Python):
import sys
input = sys.stdin.readline

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

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

print(ans)

Solution (Python):






def main():
    K, A, B = [int(i) for i in raw_input().strip().split(' ')]

    if B - A > 2:
        bis = 1

        b = A - 1
        l = K - b
        bis += b

        b = (l / 2) * (B - A)
        l = l - (l / 2) * 2
        bis += b

        bis += l

        print bis
    else:
        print 1 + K


if __name__ == '__main__':
    main()

Solution (Python):



def main():
    k, a, b = map(int, input().split())

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


if __name__ == '__main__':
    main()

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

Solution (Python):

K, A, B = [int(s) for s in input().split()]
if B-A > 2:
	b = 1
	k_hit = min(K, A-b)
	K -= k_hit
	b += k_hit
	k_trade, k_hit = divmod(K, 2)
	b += k_trade*(B-A) + k_hit
else:
	b = K+1

print(b)

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

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

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

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

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

print(ans)

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

Solution (Python):
def calc_max_biscuit(K,A,B):
    
    hit_only = 1+K
    sell_and_buy = 0
    if B-A<1:
        print(hit_only)
    else:
        K -= (A-1)
        if K%2==0:
            sell_and_buy = A + int(K/2)*(B-A)
        else:
            sell_and_buy = A + int(K/2)*(B-A)+1
        print(max(sell_and_buy, hit_only))
        
K, A, B = list(map(int, input().split()))
calc_max_biscuit(K,A,B)

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

Solution (Python):
k, a, b = map(int, input().split())
if a + 1 >= 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())
if b-a<=2:
    print(k+1)
    exit()
k-=a-1
bis=a
print(a+((b-a)*(k//2))+k%2)

Solution (Python):
def biscuit():
    cost,A,B=map(int,input().split())
    maisu=1
    if B-A<=2:
        return cost+1
    else:
        cost-=A-1
        maisu=A
        pocket=cost%2
        yen=cost//2
        return maisu+pocket+yen*(B-A)
print(biscuit())

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

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

    ans = k + 1  

    if a+1 < b:    
        u = k-a+1  

        
        
        
        ans = a + u//2*(b-a) + u%2
    print(ans)


solve()

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

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

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

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

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

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

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

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

print(max((b-a) * (k//2)+ 1 * (k % 2) + bis,k + bis))

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

if a>b or k < a+1 or b-a <3:
    print(k+1)
    exit()
else:    
    hit = max([0,int((k-(a-1))/2)])
    ans = (b-a) *hit
    temp = k-(hit*2)
    print(ans+temp+1)

Solution (Python):
def read():
    return int(input())

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

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

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

    if k % 2 == 1:
        ans += 1
else:
    ans = k + 1
print(ans)

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

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

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

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

bisk += K
print(bisk)

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

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

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

        print(bisket)

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

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

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

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

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

c = a
k = k - (a-1)
money = 0

n = k // 2
cc = c + (b-a) * n
if (k % 2) == 1 :
    cc += 1

print (cc)

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

Solution (Python):

import sys





"""Template"""


class IP:
    """
    入力を取得するクラス
    """
    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x//y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    k, a, b = ip.IL()
    u = k - (a - 1)
    print(max(a + (u // 2) * (b - a) + u % 2, k + 1))
        

main()

Solution (Python):

import sys





"""Template"""


class IP:
    """
    入力を取得するクラス
    """
    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x//y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    k, a, b = ip.IL()

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

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

main()

Solution (Python):
KAB = [int(x) for x in input().split()]
K = KAB[0]
A = KAB[1]
B = KAB[2]
count = 1
if (B - A <= 2) or K <= A:
    print(K + 1)
else:
    count = A
    K = K - A + 1
    if K % 2 == 1:
        count = count + 1 + (B - A) * (K // 2)
    else:
        count += (B - A) * K // 2
    print(count)

Solution (Python):


"""
Created on Sat Feb  9 20:41:09 2019

@author: shinjisu
"""



def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def getIntLines(n): return [int(input()) for i in range(n)]


def zeros(n): return [0]*n


def db(x):
    global debug
    if debug:
        print(x)


def probA():
    N, K = getIntList()
    db((N, K))
    if (N+1)//2>=K:
        return 'YES'
    else:
        return 'NO'


def probB():
    a, b = zeros(3), zeros(3)
    db((a,b))
    for i in range(3):
        a[i], b[i] = getIntList()
    db((a,b))
    c = set([])
    e = zeros(5)
    for i in range(3):
        c.add(a[i])
        c.add(b[i])
        e[a[i]] += 1
        e[b[i]] += 1
    db((c,e))
    c0,c1,c2,c3,c4=0,0,0,0,0
    for i in range(1, 5):
        if e[i]==0:
            c0 += 1
        elif e[i] == 1:
            c1 += 1
        elif e[i] == 2:
            c2 += 1
        elif e[i] == 3:
            c3 += 1
        else:
            c4 += 1
    db((c0,c1,c2,c3,c4))
    if c1 == 2 and c2 == 2: 
        return 'YES'
    else:
        return 'NO'


def probC():
    K, A, B = getIntList()
    db((K,A,B))
    if B-A < 3:
        bCount = 1 + K
    elif 1+K < A:
        bCount = 1 + K
    else:
        remK = 1+K-A  
        db(remK)
        bCount = A
        bCount += remK//2*(B-A)
        bCount += remK % 2
    return bCount


def issuedCode():
    for i in range(1, 10**9):
        if (1+K-i*2)//A==i:
            break
        db(i)
    bCount = B*i + (K-2*i)


debug = False
print(probC())

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

Solution (Python):

"""
def find(x):
    while table[x] >= 0:
        x = table[x]
    return x

def union(x, y):
    s1 = find(x)
    s2 = find(x)
    if s1 != s2:
        if table[s1] != table[s2]:
            if table[s1] < table[s2]:
                table[s2] = s1
            else:
                table[s1] = s2
        else:
            table[s1] -= 1
            table[s2] = s1
    return
    


a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
a3, b3 = map(int, input().split())

ans = [0 for i in range(4)]

ans[a1-1] += 1 
ans[a2-1] += 1 
ans[a3-1] += 1 
ans[b1-1] += 1 
ans[b2-1] += 1 
ans[b3-1] += 1 

if 0 in ans or 3 in ans:
    print("NO")
else:
    print("YES")
"""


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

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

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

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