Var
i, n, summ: integer;
mas: array[1..20] of integer;
begin
n := 0;
summ := 0;
while n <= 0 do <br> begin
writeln('enter N (1-20) = ');
read(n);
end;
for i := 1 to n do
begin
read(mas[i]);
if mas[i] > i then
summ := summ + mas[i]
end;
writeln('sum = ', summ);
end.