program n;
var
s,n,i: integer;
begin
s:= 0;
write('введите n: ');
readln(n);
for i := 1 to n do
s:= s + sqr(i);
writeln(s);
end.
