var a : array [1..20] of integer;
i, s, d, q, j: integer;
begin
for i:=1 to 20 do
begin
WriteLn('Vvedite ',i,' chislo: ');
Readln(a[i]);
end;
WriteLn('Vvedite nachalni promejytok: ');
Readln(s);
WriteLn('Vvedite konechni promejytok: ');
Readln(d);
for j:=s to d do
q:=a[j]+q;
WriteLn('Summ: ',q);
end.