from sys import stdin from collections import deque ## input functions for me def ria(sep = ''): if sep == '' : return list(map(int, input().split())) else: return list(map(int, input().split(sep))) def rsa(sep = ''): if sep == '' : return input().split() else: return input().split(sep) def ri(): return int(input()) def rd(): return float(input()) def rs(): return input() ## ## main ## N = ri() if N == 1: print (0) exit(0) L = deque() for i in range(2, N + 1): L.append(i) R = deque() R.append(1) c = 0 while len(L) > 0 : if c == 0: R.append(L.pop()) elif c == 1: R.appendleft(L.pop()) elif c == 2: R.append(L.popleft()) elif c == 3: R.appendleft(L.popleft()) c += 1 if c >= 4 : c -= 4 sc = 0 ll = list(R) #print(ll) for i in range(N): sc += ll[i] * ll[(i + 1) % N] + (ll[(i + 1) % N] - ll[i]) print (sc)