https://www.cuttingthechai.com/2005/12/640/counting-feathers-of-the-opposite-kind/
Counting Feathers of the Opposite Kind