For this Question: Fibonacci numbers are interesting but Tribonacci numbers are more interesting.
A Tribonacci number T(n) is the sum of the preceding three elements in a series. Consider its first three numbers to be 0, 0, and 1. i. e T(1) = 0, T(2) = 0, T(3) = 1. 
Given a number N, your task is to return the nth Tribonacci number.The input contains a single integer N.

Constraints:-
1 <= N <= 20Return the Nth Tribonacci number.Sample Input:-
4

Sample Output:-
1

Sample Input:-
7

Sample Output:-
7, I have written this Solution Code: 
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
	    
		int n = sc.nextInt();
		
System.out.print(Tribonacci(n));



}static int Tribonacci(int N){
    if(N<=2){return 0;}
if(N==3){return 1;}
return Tribonacci(N-1)+Tribonacci(N-2)+Tribonacci(N-3);
}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?