1. Captain Billy the pirate plundered 1010 gold doubloons and set sail on his ship to a deserted island to bury them as treasure. Every evening of the voyage, he paid each of his pirates one doubloon. On the eighth day of the voyage, the pirates plundered a Spanish caravel, and Billy's treasure doubled, while the number of pirates was halved. On the 48th day of the voyage, the pirates arrived at the deserted island, and Billy buried all his treasure in a spot marked with a cross - exactly 1000 doubloons. How many pirates set out with Billy to the deserted island?
Solution. Answer: 30

Before the pirates looted the caravel, Billy managed to pay the pirates their daily wages 7 times. After this, his fortune doubled. This is equivalent to Billy having 2020 doubloons before the voyage, and he paid the wages 14 times. After this, Billy paid the wages 40 times to half of the remaining pirates. This is equivalent to him paying the wages 20 times to all the pirates. In total, Billy paid the full wages 34 times during the voyage. Therefore, initially, there were $(2020-1000) / 34 = 30$ pirates.

If briefly, $1000 = (1010 - 7n) \cdot 2 - 40 \cdot \frac{n}{2}$.