#C1155. Calculate the Nth Fibonacci Number
Calculate the Nth Fibonacci Number
Calculate the Nth Fibonacci Number
In this problem, you are required to compute the nth Fibonacci number. The Fibonacci sequence \(F(n)\) is defined as follows:
\(F(0) = 0\)
\(F(1) = 1\)
\(F(n) = F(n-1) + F(n-2)\) for all \(n \geq 2\)
The sequence begins as: 0, 1, 1, 2, 3, 5, 8, ... .
Your task is to read an integer \(n\) from the standard input and output the corresponding Fibonacci number on the standard output.
inputFormat
The input consists of a single integer \(n\) (where \(0 \leq n \leq 90\) for example, to avoid overflow concerns) provided via standard input.
outputFormat
Output the \(nth\) Fibonacci number as a single integer, printed to standard output.
## sample0
0