def dist(i,j): if i==j: return 0 else: return i*j-(j-i) from itertools import permutations N=int(input()) if N<=8: X=[] Ans=float("Inf") for p in permutations(range(2,N+1)): p=(1,)+p+(1,) Money=0 for i in range(N): Money+=dist(p[i],p[i+1]) if Money