output_description: Print the maximum possible number of biscuits in Snuke's pocket after K
  operations.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K A B
attempt: # _*_ coding:utf-8 _*_
  #  Atcoder_YahooMinnanoProcon_Contest-C
  #  TODO https://atcoder.jp/contests/yahoo-procon2019-qual/tasks/yahoo_procon2019_qual_c
  
  
  def solveProblem(operation, bis2moneyone, onemoney2bis):
      if (onemoney2bis - bis2moneyone) <= 1:
          # This case all hit pocket
          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))
  
problem_description: 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.
samples: [{"input": "4 2 6", "output": "7\n    \n\nThe number of biscuits in Snuke's pocket after K operations is maximized as\nfollows:\n\n  * Hit his pocket. Now he has 2 biscuits and 0 yen.\n  * Exchange 2 biscuits to 1 yen. his pocket. Now he has 0 biscuits and 1 yen.\n  * Hit his pocket. Now he has 1 biscuits and 1 yen.\n  * Exchange 1 yen to 6 biscuits. his pocket. Now he has 7 biscuits and 0 yen.\n\n* * *"}, {"input": "7 3 4", "output": "8\n    \n\n* * *"}, {"input": "314159265 35897932 384626433", "output": "48518828981938099"}]