That night, one of the men was sleepless at the thought that everyone would fight over the coconuts at daybreak. So he arose, crept to the pile, and counted out the coconuts. Except for one coconut, it was possible to divide the pile into five equal portions. He gave the extra coconut to the monkey (who was the only other living being on the island besides those five men), buried his share of the coconuts, then went back to a sound sleep leaving the rest again in a pile.
Then another man got up and stole to the pile with the same object in mind. Again there was one coconut left over. The second man gave the spare coconut to the monkey, buried (what he thought was) his fair share, and went back to sleep, again leaving the remaining coconuts in one pile.
One by one, the remaining men got up and did the same and everytime the monkey got his share of one coconut.
In the morning, the men divided whatever coconuts remained into five equal piles, each taking his share and saying nothing about the night just past.
What is the minimum number of coconuts the five men assembled on the first day, if in the Final Division:
(a)There was again one coconut left over and the men (as usual) gave it to the monkey.
(b) There was no coconut left over for the monkey.