<gh_stars>1-10
try:
    while True:
        x = int(input())
        print(x * x - x + 2)
except EOFError:
    pass
try:
    while True:
        x = int(input())
        print(x * x - x + 2)
except EOFError:
    pass