While Moonface was a guest at the Forbidden Kingdom the king announced a competition. The competition was open to all the residents and hd the following format:
'Each participant will be taken to a center of an arena with three gates. One of them leads to treasure, another one leads to a 1-day stay in jail, and then back to the arena, and the other leads to a 2-day stay in the jail, and then back to the arena. Every time the person is back in the arena, the three gates are reshuffled.Therefore, it is impossible to identify the gates based on the past experiences.'
Could you tell us how long did it take a participant to find the treasure on average?