#21291: python 3


jerjer920813@gmail.com (YJ)


try:
while True:
n = int(input())
print(n*n-n+2)
except EOFError:
pass