Recursion
Recursion-08
Recursion-09
Recursion-10
~/algor $ cat problems/rekursiya-fibonachchi-soni
Fibonacci number
Easy
1000 ms
64 MB
27%
You are given an integer $n$. Using recursion, find the $n$-th Fibonacci number.
The Fibonacci sequence is defined as follows:
$$F_0 = 0$$
$$F_1 = 1$$
$$F_n = F_{n-1} + F_{n-2} \quad (n \ge 2)$$
Input
One line with an integer $n$ ($0 \le n \le 30$).
Output
The value of $F_n$.
Note
$0 \le n \le 30$
Examples
Input #1
0
Output #1
0
Input #2
6
Output #2
8