from random import choice

def sleeping_beauty_experiment(repetitions):
    
    gotheadsonwaking = 0
    wakenings = 0
    for _ in range(repetitions):
        coin_result = choice([, ])

        
        wakenings += 1
        if coin_result == :
            gotheadsonwaking += 1

        
        if coin_result == :
            wakenings += 1
            if coin_result == :
                gotheadsonwaking += 1   


    
    print(, repetitions, , wakenings)

    
    
    return gotheadsonwaking / wakenings


CREDENCE = sleeping_beauty_experiment(1_000_000)
print(, CREDENCE)