In the Fibonacci integer sequence, $F_0 = 0$, $F_1 = 1$, and $F_n = F_{n − 1} + F_{n − 2}$ for $n \ge 2$. For example, the first ten terms of the Fibonacci sequence are:
An alternative formula for the Fibonacci sequence is
.
Given an integer $n$, your goal is to compute the last $4$ digits of $F_n$.
Input
The input test file will contain multiple test cases. Each test case consists of a single line containing $n$ (where $0 \le n \le 1,000,000,000$). The end-of-file is denoted by a single line containing the number $−1$.
Output
For each test case, print the last four digits of $F_n$. If the last four digits of $F_n$ are all zeros, print $‘0’$; otherwise, omit any leading zeros (i.e., print $F_n$ mod $10000$).