Steve writes some numbers on the whiteboard. He starts with the number 1. Then to write the next number, he multiplies the current number by 2, then subtracts 2, then divides by 2 and finally adds 2. This number becomes the current number, Steve writes it on the board, and then he repeats the process. When he finally writes a three-digit number, how many numbers has he written?