var
a: array [1..n] of integer;
i,s:integer;
begin
s:=0;
for i:=1 to n do
if a[i]<0 then s:=s+a[i];
end;
end.
var
a: array [1..n] of integer;
i,s:integer;
begin
s:=0;
for i:=1 to n do
begin
if a[i]<0 then s:=s+a[i];
end;
end.