






'''simple docstring'''







from itertools import product





def 					SCREAMING_SNAKE_CASE_			(UpperCamelCase = 15 ) ->			int:
							lowerCamelCase__   :      float			    =			0.0
							lowerCamelCase__   :      float
							lowerCamelCase__   :      int
							lowerCamelCase__   :      int
							lowerCamelCase__   :      int
							lowerCamelCase__   :      int
							lowerCamelCase__   :      tuple[int, ...]

							for series in product(range(2 )							,     repeat=UpperCamelCase ):
														lowerCamelCase__   :      str			    =			series.count(1 )
														lowerCamelCase__   :      int			    =			num_turns - num_blue
														if num_red >= num_blue:
																					continue
														lowerCamelCase__   :      List[str]			    =			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'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_A      :     Optional[int]       	={'''configuration_visual_bert''': ['''VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VisualBertConfig''']}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A      :     Optional[int]       	=[
			    '''VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''VisualBertForMultipleChoice''',
			    '''VisualBertForPreTraining''',
			    '''VisualBertForQuestionAnswering''',
			    '''VisualBertForRegionToPhraseAlignment''',
			    '''VisualBertForVisualReasoning''',
			    '''VisualBertLayer''',
			    '''VisualBertModel''',
			    '''VisualBertPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_visual_bert import (
						    VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    VisualBertForMultipleChoice,
						    VisualBertForPreTraining,
						    VisualBertForQuestionAnswering,
						    VisualBertForRegionToPhraseAlignment,
						    VisualBertForVisualReasoning,
						    VisualBertLayer,
						    VisualBertModel,
						    VisualBertPreTrainedModel,
						)


else:
			import sys

			_A      :     int       	=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

