n=int(input("Enter a natural number"))
sum=n*(n+1)*(2*n+1)/6
print(int(sum))