program z1;
var s:integer;a:double;
begin
s:=0;a:=1;
while a<>0 do begin
readln(a);
if a<0 then s:=s+1
end;
writeln(s);
readln
end.
program z1;
var s:integer;a:double;
begin
s:=0;a:=1;
while a<>0 do begin
readln(a);
if a<0 then s:=s+1
end;
writeln(s);
readln
end.