Reroll on a twenty-sided die
Asked at Optiver, Jane Street
You roll a fair twenty-sided die (faces through ) and are paid its value in dollars. Before being paid, you may reroll once; if you do, you must accept the second roll.
What is the fair value of this game under optimal play?
Show a hint
The reroll is worth the average of a fresh d20. Keep the first roll only if it beats that.