To calculate the total number of hats given away, we need to multiply the number of heads from each planet by the number of aliens from that planet and then sum these amounts.
Here are the calculations for each planet:
-
Hinato:
- Number of heads: 8
- Number of aliens: 167
- Hats given: \( 8 \times 167 = 1336 \)
-
Qui:
- Number of heads: 5
- Number of aliens: 281
- Hats given: \( 5 \times 281 = 1405 \)
-
Piopio:
- Number of heads: 7
- Number of aliens: 74
- Hats given: \( 7 \times 74 = 518 \)
Now, we add all the hats given away from each planet:
\[ 1336 + 1405 + 518 = 3259 \]
Thus, the total number of hats given away is 3259.