Of Monkeys and Men (and Coconuts)
Five men are trapped on an island and have collected a large number of coconuts for food. Before they fall asleep, they decide that they will take turns having one man on watch duty while the others sleep, in case a rescue helicopter comes by.
Once the other men have fallen asleep, the first man divides the pile into five equal groups, giving the one leftover coconut to a curious monkey nearby. He then takes one of the five equal groups for himself, piling up the remaining coconuts. Finally, he wakes up the second man and goes to sleep.
The second, third, fourth, and fifth men repeat this process when it is their turn for watch duty, dividing the pile into fifths, giving the one leftover coconut to the observing monkey, and taking one of the fifths for themselves. The next morning, the men divide up the pile into five equal groups, with no remainder.
What is the smallest number of coconuts the men could have collected originally?