var a,b:real;
begin
readln(a);
while not(a=7) do begin
if a<0 then
b:=b+a;
readln(a);
end;
print(b);
end.
