Betty wrote a list of consecutive whole numbers starting with the number 1. She used 594 digits. What was the last number she wrote?

(Source: Adapted from Mathematics Teaching in the Middle School, Jan-Mar 1995)