var
a,b,s,i:integer;
begin
assign(input,'путь к документы');
reset(input);
assign(output,'output.txt');
rewrite(output)
readln('vvedite menshee chislo');
readln(a);
readln('vvedite bolshee chislo');
readln(b);
for i:=a to b do
s:=s+i*i;
writeln(s);
readln;
end.