Look at the picture, find the rule, fill in the number at the question mark, why?

Look at the picture, find the rule, fill in the number at the question mark, why?

The first picture: 1 + 2 + 3 + 4 + 5 + 6 = 21
The second picture: 1 + 2 + 3 + 4 + 7 + 7 = 24
The third picture: the total number should be 27, fill in 11