On October 9, 1926, a newspaper printed a short puzzle by the famous American playwright Ben Williams. It read as follows.
Five men were shipwrecked on a desert island. On the first day they worked together all day long and gathered a pile of coconuts.
That night the first man woke up and counted the coconuts. He found that if he set exactly one aside, the rest could be split into five equal piles. So he gave that one coconut to a monkey that happened to pass by, divided the remainder into five equal piles, secretly hid his own share, and went back to sleep.
Right afterwards the second man woke up and counted them, and again removing one coconut left an amount divisible into exactly five equal piles. He too gave one to the monkey, split the rest into five, hid his share, and went to sleep.
The third, the fourth, and the fifth man each did exactly the same thing in turn.
The next morning all five woke up and counted the coconuts that were left. This time the pile could be split into exactly five equal piles with none left over for the monkey, so they divided it into five and each took one pile.
How many coconuts had they gathered in the first place?
This puzzle actually has infinitely many answers, but the smallest of them is $3121$.
That, however, is not the problem we are going to solve. Let us think about the coconut story in reverse.
Suppose they originally gathered $N$ coconuts, and that $K$ people managed to share out all of the coconuts by following the rules above. In other words:
What is the largest possible value of $K$?
The input consists of several test cases.
Each test case is a single line containing one integer $N$. A line with $N = -1$ marks the end of the input and must not be processed.
Print one line for each $N$.
N coconuts, max(K) people and 1 monkey, where N is replaced by the input value and max(K) by the maximum number of people.N coconuts, no solution.