#K76762. Nth Fibonacci Number

    ID: 34715 Type: Default 1000ms 256MiB

Nth Fibonacci Number

Nth Fibonacci Number

Given an integer N, compute the Nth Fibonacci number. The Fibonacci sequence is defined as:

\( F(0)=0, \ F(1)=1 \) and \( F(n)=F(n-1)+F(n-2) \) for \( n \geq 2 \).

Your task is to implement an efficient algorithm that calculates \( F(N) \) in linear time with respect to \( N \). Ensure that your solution works correctly for edge cases, such as when \( N = 0 \) or \( N = 1 \).

inputFormat

The input consists of a single integer N read from standard input (stdin), where \(0 \le N \le 100\).

outputFormat

Output the Nth Fibonacci number to standard output (stdout).

## sample
0
0