Clifford likes to write down sequence of positive integers. Everyday, he spend 3 hours writing from \(1\) to \(1000000\) on an infinite large whiteboard and then solve brilliant.org problems.
One fateful day, he woke up late and have little time left before he should log in to brilliant.org and continue his \(1000000\) days streak. Instead of solving a practice problem to continue his streak, he wants to take a shortcut for writing the sequence. The method is to skip every same consecutive digits that occurs in the sequence to save some time.
Your mission is to help Clifford count how many digits he should write.
Original sequence :
Sequence after taking shortcut :