Паскаль.
var
N, x, i, sum : integer;
begin
readln(N);
sum := 0;
for i:=1 to N do begin
readln(x);
if x<0 then sum := sum + x;
end;
writeln(sum);
end.
Паскаль.
var
N, x, i, sum : integer;
begin
readln(N);
sum := 0;
for i:=1 to N do begin
readln(x);
if x<0 then sum := sum + x;
end;
writeln(sum);
end.