var n:word;begin;repeat readln(n);writeln(n*(n+1)*(2*n+1)div 6)until 1=0end.