Program n6_250;
Const n=10;
var a: array [1..n] of integer;
s, i: Integer;
begin
s:=0;
for i:=1 to n do
readln(a[i]);
if i>a[i] then s:=s+a[i];
end;
write (s);
end.
Program n6_250;
Const n=10;
var a: array [1..n] of integer;
s, i: Integer;
begin
s:=0;
for i:=1 to n do
begin
readln(a[i]);
if i>a[i] then s:=s+a[i];
end;
write (s);
end.