





'''simple docstring'''

from itertools import product




def  _a     (				lowerCAmelCase_ = 15						):





      """simple docstring"""



      _snake_case		:						Tuple         =  0.0
      _snake_case		:						Optional[int]         =  42
      _snake_case		:						List[Any]         =  42
      _snake_case		:						Optional[Any]         =  42
      _snake_case		:						Dict         =  42
      _snake_case		:						int         =  42
      _snake_case		:						Any         =  42

      for series in product(range(2						)      ,   repeat=_SCREAMING_SNAKE_CASE						):
            _snake_case		:						Tuple         =  series.count(1						)
            _snake_case		:						List[Any]         =  num_turns - num_blue
            if num_red >= num_blue:
                  continue
            _snake_case		:						Optional[Any]         =  1.0
            for ind, col in enumerate(_SCREAMING_SNAKE_CASE      ,   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() = }""")





def        _UpperCAmelCase							(	_SCREAMING_SNAKE_CASE       :		list							):





    """simple docstring"""


    if not isinstance(_SCREAMING_SNAKE_CASE			, _SCREAMING_SNAKE_CASE							):
        raise ValueError('Input series is not valid, valid series - [2, 4, 8]'							)
    if len(_SCREAMING_SNAKE_CASE							) == 0:
        raise ValueError('Input list must be a non empty list'							)
    if len(_SCREAMING_SNAKE_CASE							) == 1:
        return True
    try:
        SCREAMING_SNAKE_CASE_						=    series[1] / series[0]
        for index in range(len(_SCREAMING_SNAKE_CASE							) - 1							):
            if series[index + 1] / series[index] != common_ratio:
                return False
    except ZeroDivisionError:
        return False
    return True


def        _UpperCAmelCase							(	_SCREAMING_SNAKE_CASE       :		list							):





    """simple docstring"""


    if not isinstance(_SCREAMING_SNAKE_CASE			, _SCREAMING_SNAKE_CASE							):
        raise ValueError('Input series is not valid, valid series - [2, 4, 8]'							)
    if len(_SCREAMING_SNAKE_CASE							) == 0:
        raise ValueError('Input list must be a non empty list'							)
    SCREAMING_SNAKE_CASE_						=    1
    for value in series:
        answer *= value
    return pow(_SCREAMING_SNAKE_CASE			, 1 / len(_SCREAMING_SNAKE_CASE							)							)


if __name__ == "__main__":
       import doctest

       doctest.testmod()


