import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    }
} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    } main {
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) final int NUM = scan.nextInt(); NUM scan.nextInt() scan.nextInt scan int[] dp = new int[NUM+1]; dp new int[NUM+1] NUM+1 NUM 1 boolean[] broken = new boolean[NUM+1]; broken new boolean[NUM+1] NUM+1 NUM 1 int brokenNum = scan.nextInt(); brokenNum scan.nextInt() scan.nextInt scan for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        } int i = 0; int i = 0; i 0 i < brokenNum i brokenNum i++ i++ i {
            broken[scan.nextInt()] = true;
        } {
            broken[scan.nextInt()] = true;
        } broken[scan.nextInt()] = true broken[scan.nextInt()] broken scan.nextInt() scan.nextInt scan true dp[0] = 1 dp[0] dp 0 1 for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        } int i = 1; int i = 1; i 1 i <= NUM i NUM i++ i++ i {
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        } {
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        } if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            } broken[i] broken i {
               dp[i] = 0;
            } dp[i] = 0 dp[i] dp i 0 {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            } if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                } i == 1 i 1 {
                    dp[i] = 1;
                } dp[i] = 1 dp[i] dp i 1 {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                } dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007 dp[i] dp i dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007 dp[i - 1] % 1000000007 dp[i - 1] dp i - 1 i 1 1000000007 dp[i - 2] % 1000000007 dp[i - 2] dp i - 2 i 2 1000000007 System.out.println(dp[NUM] % 1000000007) System.out.println System.out System System.out dp[NUM] % 1000000007 dp[NUM] dp NUM 1000000007 String[] args args public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    }
} public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    }
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        final int NUM = scan.nextInt();
        int[] dp = new int[NUM+1];
        boolean[] broken = new boolean[NUM+1];
        int brokenNum = scan.nextInt();
        for(int i = 0; i < brokenNum; i++){
            broken[scan.nextInt()] = true;
        }

        // search
        dp[0] = 1;
        for(int i = 1; i <= NUM; i++){
            if(broken[i]){
               dp[i] = 0;
            } else {
                if(i == 1){
                    dp[i] = 1;
                } else {
                    dp[i] = dp[i - 1] % 1000000007+ dp[i - 2] % 1000000007;
                }
            }
        }

        // answer
        System.out.println(dp[NUM] % 1000000007);

    }
}