Given a list of positive integers, select the first lowest value. If there is a value to the left and/or right of the first lowest value, select them too. Remove the selected values from the list. Repeat the procedure until there is nothing left in the list. For example, given [3 2 1 1 2 4 6 5], you will first select the min 1 and remove [2 1 1], then select the min 2 and remove [3 2 4], then select 5 and remove [6 5]. The sum of your selections are 1 + 2 + 5 = 8 which is the answer.