n = int(input()) ans = (n-1) ** 2 print("{}".format(ans))