

import math
from timeit import timeit






def        __lowercase   (  _A      )  ->    List[Any]:
      SCREAMING_SNAKE_CASE			:   Tuple	  = 0
      SCREAMING_SNAKE_CASE			:   Any	  = abs(__lowerCamelCase      )
      while True:
            SCREAMING_SNAKE_CASE			:   Optional[int]	  = n // 10
            digits += 1
            if n == 0:
                  break
      return digits






def        __lowercase   (  _A      )  ->    Tuple:
      return 1 if n == 0 else math.floor(math.log(abs(__lowerCamelCase      )    ,     10      ) + 1      )






def        __lowercase   (  _A      )  ->    Dict:
      return len(str(abs(__lowerCamelCase      )      )      )






def        __lowercase   (  )  ->    List[Any]:
      from collections.abc import Callable

      def benchmark_a_function(_A    ,     _A      ) -> None:
            SCREAMING_SNAKE_CASE			:   Optional[Any]	  = F"{func.__name__}({value})"
            SCREAMING_SNAKE_CASE			:   Optional[int]	  = timeit(F"__main__.{call}"    ,     setup="""import __main__"""      )
            print(F"{call}: {func(__lowerCamelCase      )} -- {timing} seconds"      )

      for value in (262144, 1125899906842624, 1267650600228229401496703205376):
            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()






"""simple docstring"""





def       __a	(						__lowerCamelCase    ):
   for i, _ in enumerate(__lowerCamelCase    ):
      if (i % 2 == 1) == (nums[i - 1] > nums[i]):
         UpperCAmelCase_	,  UpperCAmelCase_   :   List[Any]     	=       nums[i], nums[i - 1]

   return nums


if __name__ == "__main__":
    print('Enter the array elements:')
    _a									=				list(map(int, input().split()))
    print('The unsorted array is:')
    print(array)
    print('Array after Wiggle sort:')
    print(wiggle_sort(array))


