\problem{St. Ives}

\parpic[r]{\includegraphics[width=0.06\linewidth]{stIves/roadBorder2.png}}
%\parpic[r]{\includegraphics[width=0.2\linewidth]{stIves/crossRoadSign.png}}


Robert the chapman (a medieval traveling merchant) made regular trips
between his home village and St. Ives to peddle his cloth, ribbons,
and needles. On one such trip he encountered a curious procession:
\begin{verse}
As I was traveling to St. Ives\\
I met a man with seven wives.\\
Every wife had seven sacks.\\
Every sack had seven cats.\\
Every cat had seven kits.\\
Kits, cats, sacks, wives -\\
How many were traveling to St. Ives?
\end{verse}

The answer to this classic ancient riddle is `one'. Robert was traveling to St. Ives. The others were all traveling away from St. Ives. However, if we prefer to ask the question of how many were traveling from St. Ives, we can add up:
\begin{itemize}
\item 1 man
\item 7 wives
\item 7*7 sacks
\item 7*7*7 cats
\item 7*7*7*7 kittens
\end{itemize}
for a total of 2801.

On his next trip to St. Ives, Robert met the same man, this time
accompanied by 3 wives, each with 3 sacks, and so on. Becoming curious
about what seemed to be a bizarre village ritual of some kind, Robert
kept track of how many traveled with the man each time he encountered
him during the subsequent year. 

Help Robert compute the number of people he has encountered 
during his travels to St. Ives.

\subsection*{Input}

Input consists of multiple data sets. Each data set consists of a line
with a single floating point number number representing the average number of
wives, sacks per wife, cats per sack, and kittens per cat that Robert
encountered that year. 

End of input is indicated by a value of zero.


\subsection*{Output}

For each data set, print the number traveling from St. Ives as a
floating point number presented to 2 decimal digits precision.

\subsection*{Example}

\subsubsection*{Input:}
Given the input
\verbfile{stIves/sample.judge}
the output would be
\subsubsection*{Output:}
\verbfile{stIves/sample.out}
