A printing company published a book and have made a clever riddle for you about it – When printing the book, the total of all of the page numbers amounted to using 2989 digits (e.g. page 347 takes 3 digits to write out, while the page number on page 65 takes 2 digits to write out). How many pages long is the book?