var i,j,k:integer;begin repeat readln(i);k:=0;for j:=1 to i do k:=k+j*j;writeln(k);until eof;end.