#50144: python


nnic52136@gmail.com (李Rr)


while True:
  try:
    a=int(input(''))
    print(a*(a-1)+2)
  except EOFError:
      break