**Answer:** Square.

Square the first shape's sides and the remaining shapes add up to this number.

E.g.

triangle pentagon square

>> 3x3 = 5 + 4

square hexagon hexagon square

>> 4x4 = 6 + 6 + 4

Therefore:

hexagon octagon octagon octagon octagon **square**

>> 6x6 = 8 + 8 + 8 + 8 + 4