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=list(map(int,input().split()))

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

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

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

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

Solution (Python):


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

ans = 0
if K >= A - 1:
    K -= A - 1
    ans = A
else:
    K = 0
    ans = K + 1

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

print(ans)

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):

import sys, os
try: from typing import Any, Union, List, Tuple, Dict
except ImportError: pass
sys.setrecursionlimit(10**6)
if os.environ.get("USER") == "shun":
    def debug(*args): print(*args, file=sys.stderr)
else:
    print("NO DEBUG", file=sys.stderr)
    def debug(*args): pass
def exit(): sys.exit(0)


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


if b - a <= 1:
    print(k + 1)
else:
    if k < a:
        print(k+1)
        exit()
    remain = k - (a-1)
    x = remain // 2
    y = remain - 2*x
    print(a + x*(b-a) + y)

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

Solution (Python):

def solve(k, a, b):
    if 1 + k < a or b - a <= 2:
        return 1 + k
    cnt = a
    k -= a - 1
    if k % 2 == 1:
        cnt += 1
        k -= 1
    cnt -= a * (k // 2)
    cnt += b * (k // 2)
    k -= k
    return cnt

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

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

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

k,a,b = getlist()
if a >= b-2:
    print(k+1)
else:
    diff = b - a
    shortage = a - 1
    
    if k <= shortage:
        print(k+1)
    else:
        remainturn = k-a+1
        changenum = remainturn //2
        ans = diff * changenum + a
        if remainturn % 2 == 1:
            
            ans += 1
        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, raw_input().split())
if B-A<=2:
  print K+1
else:
  c = A-1
  if c>K:
    print K+1
  else:
    if (K-c)%2!=0:
      c += 1
    print max(K+1, 1+c+(B-A)*(K-c)/2)

Solution (Python):
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
k,a,b = map(int,input().split())
if a >= b+2:
    print(1+k)
    exit()
if a>=k:
    print(1+k)
    exit()
ans = 1+k
k-=a+1
tmp = b
x = k//2
tmp = (b-a)*(x)+k%2+b
print(max(ans,tmp))

Solution (Python):


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

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):


import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


def main():
    K, A, B = MI()
    if B - A <= 2:
        return K + 1
    if K <= A:
        return K + 1
    b = A
    K -= A-1
    b += K // 2 * (B - A)
    b += K % 2
    return b


if __name__ == "__main__":
    print(main())

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

bis = 1
do = 0
if B <= A+2:
    bis += K
else:
    bis += A-1
    do += A-1
    remain_do = K - do
    if remain_do % 2 == 0:
        AB = remain_do//2
        bis += (B-A)*AB
    else:
        AB = remain_do//2
        bis += (B-A)*AB
        bis += 1
print(bis)

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

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

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

S = 1

M = min(K, A-1)
K -= M
S += M

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

print S

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

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 - 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())

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

print(ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    k,a,b = LI()
    s = b-a
    if s <= 2 or k - (a-1) < 2:
        return k+1
    t = a
    k -= a - 1
    if k % 2 == 1:
        k -= 1
        t += 1
    t += s * (k//2)

    return t



print(main())