We observe that we have the same number of partridges as drummers (12 of each); doves and pipers (22 of each); hens and lords (30 of each) and so on. So the easiest way to count our presents is to add up to the middle of the list and then double the result: (12 + 22 + 30 + 36 + 40 + 42) × 2 = 364.