A competition mark is worked out by doubling the sum of the middle four scores, then adding the average of the top and bottom scores.

Martha scores: 7 7 6 8 5 9

What is her competition mark?