Five sailors are shipwrecked on a desert island. They quickly determine that the only other inhabitant of the island is a monkey and that the only food is coconuts. They set about collecting as many coconuts as they can and put them all in a very large pile. By nightfall they are too tired to divide the harvest; so they agree to go to sleep and share the coconuts equally the next morning.
During the night one sailor awakens, suspicious that the others might try to cheat him, and decides to take his portion then and there and not wait until morning. He divides the coconuts into five piles and finds there is one coconut left over, which he gives to the monkey. He hides one of the five piles, then puts the rest of the coconuts back into a pile and returns to sleep. Later a second sailor awakens with the same suspicions and does the same thing: He divides the coconuts into five piles, leaving one extra, which he gives to the monkey. Then he hides what he thinks is his share, puts the remaining coconuts into a pile and goes back to sleep.
One after the other, the rest of the sailors do the same: They each take one fifth of the coconuts in the pile (there is always an extra one, which is given to the monkey) and then return to sleep. When the sailors awaken the next morning they all notice the coconut pile is much smaller than it was the night before, but since each man is as guilty as the others, no one says anything. They divide the coconuts (for the sixth time) and again there is one left for the monkey.
How many coconuts were in the original pile?