uses crt;
const fi='so.txt';
fo='am.txt';
var f1,f2:text;
a:array[1..100]of integer;
dem,i,dem1:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
dem:=0;
while not eoln(f1) do
begin
dem:=dem+1;
read(f1,a[dem]);
end;
{--------------------------xu-ly----------------------}
dem1:=0;
for i:=1 to dem do
if a[i]<0 then inc(dem1);
writeln(f2,dem1);
close(f1);
close(f2);
readln;
end.