#K49727. Tribonacci Number Calculation
Tribonacci Number Calculation
Tribonacci Number Calculation
In this problem, you are asked to compute the M-th Tribonacci number. The Tribonacci sequence is defined as follows: $$T(0)=0,; T(1)=1,; T(2)=1$$ and for ( n \ge 3 ), the recurrence relation is given by $$T(n)=T(n-1)+T(n-2)+T(n-3).$$ Given an integer ( M ) (with (0 \le M \le 35)), compute the corresponding Tribonacci number ( T(M) ). The answer is guaranteed to be less than (10^9).
inputFormat
The input is read from standard input (stdin). The first and only line contains a single integer ( M ), representing the index in the Tribonacci sequence.
outputFormat
Output the M-th Tribonacci number to standard output (stdout).## sample
0
0