roll 2 6 sided dice, only get to roll the second one if you can't roll a sum over 10 (so first is 4 or lower). find the ev 3. now you can choose the number of sides, should the lower sided dice be rolled first or second 4. find the optimal number of sides to maximize the ev