output_description: Print the performance required to achieve the objective.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      R
      G
attempt: import sys
  
  sys.setrecursionlimit(4100000)
  
  
  def inputs(num_of_input):
      ins = [input() for i in range(num_of_input)]
      return ins
  
  
  def solve(inputs):
      key = inputs[0]
      hint = inputs[1]
      len_hint = len(hint)
      possibility = []  # matched_index
      hint_start_i = -1
      for i, c in enumerate(key):
          if c == hint[0] or c == "?":
              possibility.append(0)
  
          new_possibility = []
          for matched_hint_index in possibility:
              if c == hint[matched_hint_index] or c == "?":
                  new_possibility.append(matched_hint_index + 1)
  
                  if matched_hint_index + 1 == len_hint:
                      hint_start_i = i - len_hint + 1
                      break
  
          possibility = new_possibility
  
          if hint_start_i != -1:
              break
  
      if hint_start_i == -1:
          return "UNRESTORABLE"
  
      resolved_key = ""
      for i, c in enumerate(key):
          if i == hint_start_i:
              resolved_key += hint
          elif i >= hint_start_i and i <= hint_start_i + len_hint:
              continue
          elif c == "?":
              resolved_key += "a"
          else:
              resolved_key += c
      return resolved_key
  
  
  def string_to_int(string):
      return list(map(lambda x: int(x), string.split()))
  
  
  if __name__ == "__main__":
      ret = solve(inputs(2))
      print(ret)
  
problem_description: Statement
  
  Takahashi is a user of a site that hosts programming contests.  
  When a user competes in a contest, the _rating_ of the user (not necessarily
  an integer) changes according to the _performance_ of the user, as follows:
  
    * Let the current rating of the user be a.
    * Suppose that the performance of the user in the contest is b.
    * Then, the new rating of the user will be the avarage of a and b.
  
  For example, if a user with rating 1 competes in a contest and gives
  performance 1000, his/her new rating will be 500.5, the average of 1 and 1000.
  
  Takahashi's current rating is R, and he wants his rating to be exactly G after
  the next contest.  
  Find the performance required to achieve it.
samples: [{"input": "2002\n    2017", "output": "2032\n    \n\nTakahashi's current rating is 2002.  \nIf his performance in the contest is 2032, his rating will be the average of\n2002 and 2032, which is equal to the desired rating, 2017.\n\n* * *"}, {"input": "4500\n    0", "output": "-4500\n    \n\nAlthough the current and desired ratings are between 0 and 4500, the\nperformance of a user can be below 0."}]