The Fibonacci sequence is a famous integer sequence defined by Leonardo of Pisa in 1202. It is defined as follows:
What you may not know is that Frodo of Bag End also defined an integer sequence, the Frodo sequence. It is defined as follows:
Given $n$, write a program that finds $Fro_n$.
The input is a sequence of integers, one per line. The end of input is signaled by the integer $0$. Every integer other than the final $0$ is positive and less than $2^{31}$.
For each positive integer $n$, print $Fro_n$ on its own line.