#P9825. [ICPC 2020 Shanghai R] Fibonacci
[ICPC 2020 Shanghai R] Fibonacci
Description
In mathematics, the Fibonacci numbers, commonly denoted as , is a sequence such that each number is the sum of the two preceding numbers, starting with and . That is, and .
Thus, the beginning of the sequence is .
Given , please calculate , where when is even, otherwise .
Input Format
The only line contains one integer .
Output Format
Output one number -- .
3
2
10
24
100
2739
京公网安备 11011102002149号