for i:= 0 to Length(Spisok)-1 do begin if spisok[i]=0 then begin newLength:=i; Break; end; end; SetLength(Spisok, newLength);