You asked for it, you got it.
Assumptions: Using a single fair die, whether a d4, d6, d8, d10, or d12, we will roll it up to four times. We only take a second roll if the first was maximal, we only take a third roll if the second roll was taken and maximal, and we only take a fourth roll if...