Alice rolls a fair sided die with the values on the sides. She sees that value showing up and then is allowed to decide whether or not she wants to roll again. The re-roll costs $1. If she decides to stop, Alice receives a payout equal to the upface of the die. If she rolls again, she receives a payout equal to the upfaces of the second roll. Assuming Alice plays optimally and can only re-roll at most once, what is her expected payout on this game?
Source: QuantQuestions.io