Asha loves mathematics a lot. She always spends her time by playing with digits. Suddenly, she is stuck with a hard problem, listed below. Help Asha to solve this magical problem of mathematics.
Given a number N (using any standard input method), compute how many integers between 1 and N, inclusive, do not contain two consecutive identical digits. For example 1223 should not be counted, but 121 should be counted.
Test Cases
7 => 7
1000 => 819
3456 => 2562
10000 => 7380
Scoring
This is code-golf, so the shortest answer in bytes wins.