https://www.geofffox.com/MT/archives/2009/04/13/the-pirate-problem.php
The Pirate Problem