"Five men and a monkey were shipwrecked on an uninhabited island, and they spent the first day on that island collecting coconuts. They piled them into a huge heap and laid down to sleep.

 

But after a while when everybody had fallen asleep one man woke up, and thought that there would probably be difficulties in the morning when the nuts were to be distributed. Therefore he decided to get up and take care of his share. He divided the coconuts into five heaps. One nut was over, and that he gave to the monkey. Then he hid his heap of nuts and reassembled the rest of the nuts into one big heap again.

 

Soon another man woke up and did exactly the same. And he too got one nut over, which he gave to the monkey. And during the night all five men were up, one after the other. Each one took his fifth of those coconuts that were still in the heap when he woke up, and each one got one nut over which was given to the monkey.

 

In the morning they shared the coconuts that were left and each one got his fifth of the remaining nuts. No nuts to the monkey this time, the division by five leaving none over. Of course all must have known that nuts were missing, but each one felt guilty, so nobody mentioned it.

 

How many coconuts were there at the start?"

 

(Martin Gardner "Rolig matematik. Andra samlingen.")