Digit 6 appeared 18 times in the page numbers. What is the minimum number of pages there are in the book?