Problem Statement | |||||||||||||
Cyclists don't like the number eight because it symbolizes a broken wheel. Recently, the mayor of Moscow decided to force all cyclists to get an identification number. Vasya was presented with the following choice: he can choose any number between low and high, inclusive. He wants his number to contain as few eights as possible. Return the minimal possible number of eights he can have in his number. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | low will be between 1 and 2000000000, inclusive. | ||||||||||||
- | high will be between low and 2000000000, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
|