



'''simple docstring'''


from __future__ import annotations

from typing import Any

class  SCREAMING_SNAKE_CASE :






    """simple docstring"""





    def __init__(  self      :					List[str]  ,						UpperCamelCase__      :					int = 6 ):


       """simple docstring"""







       UpperCamelCase					=  None
       UpperCamelCase					=  None
       self.create_linked_list(UpperCamelCase__ )






    def  A       (  self      :					List[Any]  ,						UpperCamelCase__      :					int ):


       """simple docstring"""







       UpperCamelCase					=  Node()
       UpperCamelCase					=  current_node
       UpperCamelCase					=  current_node
       UpperCamelCase					=  current_node
       for _ in range(1  ,						UpperCamelCase__ ):
          UpperCamelCase					=  Node()
          UpperCamelCase					=  current_node
          UpperCamelCase					=  previous_node
          UpperCamelCase					=  current_node
       UpperCamelCase					=  self.front
       UpperCamelCase					=  previous_node






    def  A       (  self      :					str ):


       """simple docstring"""







       return (
           self.front == self.rear
           and self.front is not None
           and self.front.data is None
       )






    def  A       (  self      :					List[str] ):


       """simple docstring"""







       self.check_can_perform_operation()
       return self.front.data if self.front else None






    def  A       (  self      :					str  ,						UpperCamelCase__      :					Any ):


       """simple docstring"""







       if self.rear is None:
          return

       self.check_is_full()
       if not self.is_empty():
          UpperCamelCase					=  self.rear.next
       if self.rear:
          UpperCamelCase					=  data






    def  A       (  self      :					Dict ):


       """simple docstring"""







       self.check_can_perform_operation()
       if self.rear is None or self.front is None:
          return None
       if self.front == self.rear:
          UpperCamelCase					=  self.front.data
          UpperCamelCase					=  None
          return data

       UpperCamelCase					=  self.front
       UpperCamelCase					=  old_front.next
       UpperCamelCase					=  old_front.data
       UpperCamelCase					=  None
       return data






    def  A       (  self      :					Any ):


       """simple docstring"""







       if self.is_empty():
          raise Exception('Empty Queue' )






    def  A       (  self      :					Tuple ):


       """simple docstring"""







       if self.rear and self.rear.next == self.front:
          raise Exception('Full Queue' )

class  SCREAMING_SNAKE_CASE :






    """simple docstring"""





    def __init__(  self      :					Any ):


       """simple docstring"""







       UpperCamelCase					=  None
       UpperCamelCase					=  None
       UpperCamelCase					=  None


if __name__ == "__main__":
   import doctest

   doctest.testmod()






'''simple docstring'''


def 				__lowerCamelCase				(   A__ = 10**9    )       ->	int:






   """simple docstring"""
   UpperCamelCase					=  1
   UpperCamelCase					=  2

   UpperCamelCase					=  0
   UpperCamelCase					=  0
   UpperCamelCase					=  0
   while perimeter <= max_perimeter:
      perimeters_sum += perimeter

      prev_value += 2 * value
      value += prev_value

      UpperCamelCase					=  2 * value + 2 if i % 2 == 0 else 2 * value - 2
      i += 1

   return perimeters_sum


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

