




'''simple docstring'''
from itertools import product
def 							snake_case_    (  a__						:      int = 15     ):



    """simple docstring"""




    __lowercase     							=		0.0
    __lowercase     							=		42
    __lowercase     							=		42
    __lowercase     							=		42
    __lowercase     							=		42
    __lowercase     							=		42
    __lowercase     							=		42

    for series in product(range(2     )       ,repeat=a__     ):
        __lowercase     							=		series.count(1     )
        __lowercase     							=		num_turns - num_blue
        if num_red >= num_blue:
            continue
        __lowercase     							=		1.0
        for ind, col in enumerate(a__       ,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'''
import os
def 							snake_case_    (  ):



    """simple docstring"""




    __lowercase     							=		os.path.dirname(os.path.realpath(a__     )     )
    __lowercase     							=		os.path.join(a__       ,"""triangle.txt"""     )

    with open(a__     ) as f:
        __lowercase     							=		f.readlines()

    __lowercase     							=		[[int(a__     ) for y in x.rstrip("""\r\n"""     ).split(""" """     )] for x in triangle]

    for i in range(1       ,len(a__     )     ):
        for j in range(len(a[i]     )     ):
            __lowercase     							=		a[i - 1][j] if j != len(a[i - 1]     ) else 0
            __lowercase     							=		a[i - 1][j - 1] if j > 0 else 0
            a[i][j] += max(a__       ,a__     )
    return max(a[-1]     )


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




