#C14445. Nth Fibonacci Number
Nth Fibonacci Number
Nth Fibonacci Number
Given a positive integer (n), compute the (n)-th Fibonacci number. The Fibonacci sequence is defined as follows: (F(1)=0), (F(2)=1), and for (n \ge 3), (F(n)=F(n-1)+F(n-2)).
You are required to read the input from standard input and output the result to standard output. It is guaranteed that the input is a positive integer.
inputFormat
The input is given as a single line from standard input containing one integer (n).
Constraints: (1 \le n \le 10^4).
outputFormat
Output a single line to standard output containing the (n)-th Fibonacci number.## sample
1
0