



"""simple docstring"""





from __future__ import annotations

from typing import Any
class 				lowercase__       :







       '''simple docstring'''


       def __init__(							self      :  Union[str, Any]		,    _UpperCAmelCase      :  int = 6   )			->						None:


             '''simple docstring'''




             UpperCAmelCase_      			=							None
             UpperCAmelCase_      			=							None
             self.create_linked_list(_SCREAMING_SNAKE_CASE   )



       def 					lowercase__    (							self      :  List[Any]		,    _UpperCAmelCase      :  int   )			->						None:


             '''simple docstring'''




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



       def 					lowercase__    (							self      :  Optional[int]   )			->						bool:


             '''simple docstring'''




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



       def 					lowercase__    (							self      :  List[str]   )			->						Any | None:


             '''simple docstring'''




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



       def 					lowercase__    (							self      :  List[str]		,    _UpperCAmelCase      :  Any   )			->						None:


             '''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 					lowercase__    (							self      :  str   )			->						Any:


             '''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 					lowercase__    (							self      :  str   )			->						None:


             '''simple docstring'''




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







       def 					lowercase__    (							self      :  Union[str, Any]   )			->						None:


             '''simple docstring'''




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



class 				lowercase__       :







       '''simple docstring'''


       def __init__(							self      :  Optional[Any]   )			->						None:


             '''simple docstring'''




             UpperCAmelCase_      			=							None
             UpperCAmelCase_      			=							None
             UpperCAmelCase_      			=							None


if __name__ == "__main__":
       import doctest

       doctest.testmod()









"""simple docstring"""





def        a__     (				lowerCAmelCase__ = 2000000				):
      UpperCAmelCase_      			=							[0 for i in range(n + 1				)]
      UpperCAmelCase_      			=							1
      UpperCAmelCase_      			=							1

      for i in range(2     ,      int(n**0.5				) + 1				):
            if primality_list[i] == 0:
                  for j in range(i * i     ,      n + 1     ,      lowerCAmelCase__				):
                        UpperCAmelCase_      			=							1
      UpperCAmelCase_      			=							0
      for i in range(lowerCAmelCase__				):
            if primality_list[i] == 0:
                  sum_of_primes += i
      return sum_of_primes


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




