#P9825. [ICPC 2020 Shanghai R] Fibonacci
[ICPC 2020 Shanghai R] Fibonacci
题目描述
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 .
输入格式
The only line contains one integer .
输出格式
Output one number -- .
3
2
10
24
100
2739