#41262: python


suyueh (suyueh)


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