output_description: When the minimum fee is x yen, print the value of x.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N A B
attempt: import time
  import random
  
  ##
  # DEV
  
  
  NN = 17
  XX = [0] * (2 ** (NN + 1) - 1)
  
  
  def addvalue(j, x):
      i = 2**NN + j - 1
      while i >= 0:
          XX[i] += x
          i = (i - 1) // 2
  
  
  def getvalue(j):
      return XX[j + 2**NN - 1]
  
  
  def rangesum(a, b):
      l = a + (1 << NN)
      r = b + (1 << NN)
      s = 0
      while l < r:
          if l % 2:
              s += XX[l - 1]
              l += 1
          if r % 2:
              r -= 1
              s += XX[r - 1]
          l >>= 1
          r >>= 1
      return s
  
  
  def debug():
      mm = 10
      tmp = [(i, XX[i + 2**NN - 1]) for i in range(2**NN) if XX[i + 2**NN - 1] != 0]
      if len(tmp) <= mm:
          print(tmp)
      else:
          print(tmp[:mm])
  
  
  addvalue(3, 10)
  print(rangesum(1, 12))
  addvalue(5, 7)
  print(rangesum(1, 12))
  addvalue(13, 5)
  print(rangesum(1, 12))
  print(rangesum(1, 15))
  debug()
  print(getvalue(6))
  
  sTime = time.time()
  for i in range(10**5):
      a, b = random.randrange(1 << NN), random.randrange(10**5)
      # print("ADD", a, b)
      # addvalue(a, b)
      ii = 2**NN + a - 1
      while ii >= 0:
          XX[ii] += b
          ii = (ii - 1) // 2
      # debug()
      c, d = random.randrange(1 << NN), random.randrange(1 << NN)
      c, d = min(c, d), max(c, d)
      # print("Sum", c, d)
      # print(rangesum(c, d))
      # x = rangesum(c, d)
  
  print(time.time() - sTime, "sec")
  
problem_description: Statement
  
  You are parking at a parking lot. You can choose from the following two fee
  plans:
  
    * Plan 1: The fee will be A×T yen (the currency of Japan) when you park for T hours.
    * Plan 2: The fee will be B yen, regardless of the duration.
  
  Find the minimum fee when you park for N hours.
samples: [{"input": "7 17 120", "output": "119\n    \n\n  * If you choose Plan 1, the fee will be 7\u00d717=119 yen.\n  * If you choose Plan 2, the fee will be 120 yen.\n\nThus, the minimum fee is 119 yen.\n\n* * *"}, {"input": "5 20 100", "output": "100\n    \n\nThe fee might be the same in the two plans.\n\n* * *"}, {"input": "6 18 100", "output": "100"}]