




'''simple docstring'''







from itertools import product







def 	_A			(   UpperCAmelCase = 15	):






   '''simple docstring'''







   A__         =    0.0
   A__         =    42
   A__         =    42
   A__         =    42
   A__         =    42
   A__         =    42
   A__         =    42

   for series in product(range(2	)			,repeat=UpperCAmelCase	):
      A__         =    series.count(1	)
      A__         =    num_turns - num_blue
      if num_red >= num_blue:
         continue
      A__         =    1.0
      for ind, col in enumerate(UpperCAmelCase			,2	):
         if col == 0:
            prob *= (ind - 1) / ind
         else:
            prob *= 1 / ind

      total_prob += prob

   return int(1 / total_prob	)


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








'''simple docstring'''







def 	_A			(   UpperCAmelCase	):






   '''simple docstring'''







   if not isinstance(UpperCAmelCase			,UpperCAmelCase	) or not all(
       isinstance(UpperCAmelCase			,UpperCAmelCase	) and item >= 0 for item in citations	):
      raise ValueError('The citations should be a list of non negative integers.'	)

   citations.sort()
   A__         =    len(UpperCAmelCase	)

   for i in range(UpperCAmelCase	):
      if citations[len_citations - 1 - i] <= i:
         return i

   return len_citations


if __name__ == "__main__":
    import doctest

    doctest.testmod()


