Var
a:array[1..17] of real;
b,c,m,cr:real;
i,j:integer;
BEGIN
randomize;
for i:=1 to 17 do begin
a[i]:=random(-8,8);
write(a[i]:3);
end;
writeln;
for j:=1 to 17 do if a[j] < 0 then begin c:=c+a[j]; m:=m+1; end;
cr:=c/m;
for i:=1 to 17 do begin
if a[i] = 0 then a[i]:=cr;
write(a[i]:3);
end;
END.