Calculate minimum price of n - 2 most costly person
for i in range ( n - 1 , 1 , - 2 ) : NEW_LINE INDENT if ( i == 2 ) : NEW_LINE INDENT totalCost += price [ 2 ] + price [ 0 ] NEW_LINE DEDENT else : NEW_LINE DEDENT