






import math
from timeit import timeit


def   _A       (    SCREAMING_SNAKE_CASE__  :     int	):
    UpperCamelCase	:Dict     							=       0
    UpperCamelCase	:List[Any]     							=       abs(SCREAMING_SNAKE_CASE__	)
    while True:
        UpperCamelCase	:Tuple     							=       n // 10
        digits += 1
        if n == 0:
            break
    return digits


def   _A       (    SCREAMING_SNAKE_CASE__  :     int	):
    return 1 if n == 0 else math.floor(math.log(abs(SCREAMING_SNAKE_CASE__	)					,  10	) + 1	)


def   _A       (    SCREAMING_SNAKE_CASE__  :     int	):
    return len(str(abs(SCREAMING_SNAKE_CASE__	)	)	)


def   _A       (    ):
    from collections.abc import Callable

    def benchmark_a_function(SCREAMING_SNAKE_CASE__  :     Callable					,  SCREAMING_SNAKE_CASE__  :     int	) -> None:
        UpperCamelCase	:List[Any]     							=       F'''{func.__name__}({value})'''
        UpperCamelCase	:Optional[Any]     							=       timeit(F'''__main__.{call}'''					,  setup='''import __main__'''	)
        print(F'''{call}: {func(SCREAMING_SNAKE_CASE__	)} -- {timing} seconds'''	)

    for value in (262144, 1125899906842624, 1267650600228229401496703205376):
        for func in (num_digits, num_digits_fast, num_digits_faster):
            benchmark_a_function(SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	)
        print()


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 benchmark()













def   _A       (    SCREAMING_SNAKE_CASE__  :     int = 998001	):

    # fetches the next number
    for number in range(n - 1					,  9999					,  -1	):
        UpperCamelCase	:Union[str, Any]     							=       str(SCREAMING_SNAKE_CASE__	)

        # checks whether 'str_number' is a palindrome.
        if str_number == str_number[::-1]:
            UpperCamelCase	:Dict     							=       999

            # if 'number' is a product of two 3-digit numbers
            # then number is the answer otherwise fetch next number.
            while divisor != 99:
                if (number % divisor == 0) and (len(str(number // divisor	)	) == 3.0):
                    return number
                divisor -= 1
    raise ValueError('''That number is larger than our acceptable range.'''	)


if __name__ == "__main__":
 print(f'''{solution() = }''')





