For this Question: Given an integer N, find the number of distinct arrays A, such that the sum of integers in the array is N and each integer in the array is greater than or equal to 3.

As the answer can be large, output it modulo 10<sup>9</sup>+7.The first and the only line of input contains an integer N.

Constraints
1 <= N <= 1000Output a single integer, the number of arrays modulo 1000000007.Sample Input
8

Sample Output
4

Explanation:
Following are the possible arrays: [3, 5], [4, 4], [5, 3], [8].

Sample Input
2

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



class Main {
	public static void main (String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine().trim());
		long[] arr = new long[n+1];

		for(int i = 3; i <= n; i++)
			arr[i] = -1;

		if(n < 3) {
			System.out.println(0);
		} else {
			long out = findRandomSequences(n, arr);
			System.out.println(out);
		}
	}

	public static long findRandomSequences(int n, long arr[]) {
		if(n >= 3 && n < 6)
			return 1;

		if(arr[n] != -1)
			return arr[n];

		long count = 0;

		for(int i = n-3; i >= 3; i--) {
			count += (findRandomSequences(i, arr) % 1000000007);
		}
		arr[n] = (count+1) % 1000000007;
		return arr[n];
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?