n = int(input()) print(n*(n-1))