



"""simple docstring"""




# Algorithm for the pigeonhole sorting



def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						List[str]    )  ->       int:





     '''simple docstring'''

     _UpperCAmelCase      :     int        =   min(SCREAMING_SNAKE_CASE__    )  # min() finds the minimum value
     _UpperCAmelCase      :     List[Any]        =   max(SCREAMING_SNAKE_CASE__    )  # max() finds the maximum value

     _UpperCAmelCase      :     Optional[int]        =   max_val - min_val + 1  # size is difference of max and min values plus one

     # list of pigeonholes of size equal to the variable size
     _UpperCAmelCase      :     Optional[Any]        =   [0] * size

     # Populate the pigeonholes.
     for x in a:
          assert isinstance(SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__    ), "integers only please"
          holes[x - min_val] += 1

     # Putting the elements back into the array in an order.
     _UpperCAmelCase      :     Optional[Any]        =   0
     for count in range(SCREAMING_SNAKE_CASE__    ):
          while holes[count] > 0:
               holes[count] -= 1
               _UpperCAmelCase      :     List[Any]        =   count + min_val
               i += 1

def 						__snake_case						(				)  ->       int:





     '''simple docstring'''

     _UpperCAmelCase      :     Any        =   [8, 3, 2, 7, 4, 6, 8]
     pigeonhole_sort(SCREAMING_SNAKE_CASE__    )
     print("Sorted order is:"						,  " ".join(SCREAMING_SNAKE_CASE__    )    )


if __name__ == "__main__":
 main()





"""simple docstring"""




def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						Dict=28_123    )  ->       List[str]:





     '''simple docstring'''

     _UpperCAmelCase      :     List[Any]        =   [1] * (limit + 1)

     for i in range(2						,  int(limit**0.5    ) + 1    ):
          sum_divs[i * i] += i
          for k in range(i + 1						,  limit // i + 1    ):
               sum_divs[k * i] += k + i

     _UpperCAmelCase      :     Any        =   set()
     _UpperCAmelCase      :     List[str]        =   0

     for n in range(1						,  limit + 1    ):
          if sum_divs[n] > n:
               abundants.add(SCREAMING_SNAKE_CASE__    )

          if not any((n - a in abundants) for a in abundants    ):
               res += n

     return res


if __name__ == "__main__":
 print(solution())
