For given two real numbers and ,
a positive integer is called -friend exponent of for if and shares the first -significant digits.
For example, is a -friend exponent of for because and shares "".
Let denote the minimum -friend exponent of for .
It can be verified that , , and .
Find .
[My timing: 0.5 sec. (PyPy)]