5.
Parties and the seats won by them are listed in the following table.
Party A: South 40, East 37, West 35, North 27
Party B: South 6, East 26, West 76, North 86
Party C: South 83, East 71, West 4, North 21
Party D: South 1, East 7, West 3, North 11
Based on the given data, the total number of candidates elected is ______.