Fibonacci numbers: the last digit#4529

Fibonacci numbers: the last digit

1 second
128 megabytes
Easy

The first who came closest

to solving the mystery of time

measurement on the planet Earth

was a great Fibonacci, though perhaps

he himself had no idea about it....

Find the last digit of the -th Fibonacci number.

Fibonacci numbers are defined by the following recurrence relations:

prb4529

Input

Each line contains a single number (0 \leq k \leq 9223372036854775807).

Output

For each test case print in a separate line the last digit of the -th Fibonacci number.

Examples

Example 1

Loading
Loading