






import math
from timeit import timeit


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						_UpperCAmelCase             =    0
						_UpperCAmelCase             =    abs(__lowerCAmelCase			)
						while True:
												_UpperCAmelCase             =    n // 10
												digits += 1
												if n == 0:
																		break
						return digits


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						return 1 if n == 0 else math.floor(math.log(abs(__lowerCAmelCase			)				,	10			) + 1			)


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						return len(str(abs(__lowerCAmelCase			)			)			)


def __A					(   )->						None:





						"""simple docstring"""



						from collections.abc import Callable

						def benchmark_a_function(__lowerCAmelCase				,	__lowerCAmelCase			) -> None:
												_UpperCAmelCase             =    F"""{func.__name__}({value})"""
												_UpperCAmelCase             =    timeit(F"""__main__.{call}"""				,	setup='import __main__'			)
												print(F"""{call}: {func(__lowerCAmelCase			)} -- {timing} seconds"""			)

						for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
												for func in (num_digits, num_digits_fast, num_digits_faster):
																		benchmark_a_function(__lowerCAmelCase				,	__lowerCAmelCase			)
												print()


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		benchmark()








from typing import Any





class __lowerCamelCase				:





	"""simple docstring"""






	def __init__(							self					):
							"""simple docstring"""







							_UpperCAmelCase             =    []
							_UpperCAmelCase             =    0

	def __str__(							self					):
							"""simple docstring"""







							_UpperCAmelCase             =    '<' + str(self.stack					)[1:-1] + '>'
							return printed

	def  UpperCamelCase					(							self ,					UpperCAmelCase					):
							"""simple docstring"""







							self.stack.append(UpperCAmelCase					)
							_UpperCAmelCase             =    self.length + 1

	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							self.rotate(1					)
							_UpperCAmelCase             =    self.stack[self.length - 1]
							_UpperCAmelCase             =    self.stack[:-1]
							self.rotate(self.length - 1					)
							_UpperCAmelCase             =    self.length - 1
							return dequeued

	def  UpperCamelCase					(							self ,					UpperCAmelCase					):
							"""simple docstring"""







							for _ in range(UpperCAmelCase					):
													_UpperCAmelCase             =    self.stack[0]
													_UpperCAmelCase             =    self.stack[1:]
													self.put(UpperCAmelCase					)
													_UpperCAmelCase             =    self.length - 1

	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							_UpperCAmelCase             =    self.get()
							self.put(UpperCAmelCase					)
							self.rotate(self.length - 1					)
							return front

	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							return self.length
