Given is an integer S. Find how many sequences there are whose terms are all integers greater than or equal to 3, and whose sum is equal to S. The answer can be very large, so output it modulo 10^9 + 7.

Constraints

* 1 \leq S \leq 2000
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


S


Output

Print the answer.

Examples

Input

7


Output

3


Input

2


Output

0


Input

1729


Output

294867501
     import java.math.BigInteger;
        import java.util.*;
        import java.io.*;
 
public class Main {
    static long[]memo;
    static int mod = (int)1e9+7;
    static long dp(int sum){
        if (sum<=2)
            return sum==0?1:0;
        if (memo[sum]!=-1)
            return memo[sum];
        long ans=0;
        for (int i =3;i<=sum;i++){
            ans+=dp(sum-i);
            ans%=mod;
        }
        return memo[sum]=ans;
    }
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int n = sc.nextInt();
        memo= new long[n+1];
        Arrays.fill(memo,-1);
        pw.println(dp(n));
        pw.flush();
 
    }
    static class Scanner {
        BufferedReader br;
        StringTokenizer st;
 
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }
 
        public Scanner(FileReader f) {
            br = new BufferedReader(f);
        }
 
        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
 
        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
 
        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }
 
        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
 
        public int[] nextIntArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = Integer.parseInt(next());
            }
            return arr;
        }
 
    }
 
}