import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int stepNum = sc.nextInt();
		int brokenNum = sc.nextInt();
		int[] brokenSteps = new int[brokenNum];
		for(int i = 0; i < brokenNum; i++)brokenSteps[i] = sc.nextInt();
        
        Dp dp = new Dp(stepNum+1);
        for(int index : brokenSteps) Dp.dp[index] = 0;
        int ans = dp.part(stepNum);

		System.out.println(ans);
    }
}

class Dp {
    public static int[] dp;
    public Dp (int num) {
        dp = new int[num];
        for(int i = 0; i < num; i++)dp[i] = -1;
    }

    public int part(int index) {
        if(dp[index] != -1)return dp[index];
        if(index == 0) dp[index] = 1;
        else if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2);
        while(dp[index] >= Mod.mod) dp[index] -= Mod.mod;
        return dp[index];
    }
}

class Mod{
    static int mod = 1000000007;
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int stepNum = sc.nextInt();
		int brokenNum = sc.nextInt();
		int[] brokenSteps = new int[brokenNum];
		for(int i = 0; i < brokenNum; i++)brokenSteps[i] = sc.nextInt();
        
        Dp dp = new Dp(stepNum+1);
        for(int index : brokenSteps) Dp.dp[index] = 0;
        int ans = dp.part(stepNum);

		System.out.println(ans);
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int stepNum = sc.nextInt();
		int brokenNum = sc.nextInt();
		int[] brokenSteps = new int[brokenNum];
		for(int i = 0; i < brokenNum; i++)brokenSteps[i] = sc.nextInt();
        
        Dp dp = new Dp(stepNum+1);
        for(int index : brokenSteps) Dp.dp[index] = 0;
        int ans = dp.part(stepNum);

		System.out.println(ans);
    } main {
		Scanner sc = new Scanner(System.in);
		int stepNum = sc.nextInt();
		int brokenNum = sc.nextInt();
		int[] brokenSteps = new int[brokenNum];
		for(int i = 0; i < brokenNum; i++)brokenSteps[i] = sc.nextInt();
        
        Dp dp = new Dp(stepNum+1);
        for(int index : brokenSteps) Dp.dp[index] = 0;
        int ans = dp.part(stepNum);

		System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int stepNum = sc.nextInt(); stepNum sc.nextInt() sc.nextInt sc int brokenNum = sc.nextInt(); brokenNum sc.nextInt() sc.nextInt sc int[] brokenSteps = new int[brokenNum]; brokenSteps new int[brokenNum] brokenNum for(int i = 0; i < brokenNum; i++)brokenSteps[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < brokenNum i brokenNum i++ i++ i brokenSteps[i] = sc.nextInt(); brokenSteps[i] = sc.nextInt() brokenSteps[i] brokenSteps i sc.nextInt() sc.nextInt sc Dp dp = new Dp(stepNum+1); dp new Dp(stepNum+1) for(int index : brokenSteps) Dp.dp[index] = 0; int index brokenSteps Dp.dp[index] = 0; Dp.dp[index] = 0 Dp.dp[index] Dp.dp Dp Dp.dp index 0 int ans = dp.part(stepNum); ans dp.part(stepNum) dp.part dp stepNum System.out.println(ans) System.out.println System.out System System.out ans String[] args args class Dp {
    public static int[] dp;
    public Dp (int num) {
        dp = new int[num];
        for(int i = 0; i < num; i++)dp[i] = -1;
    }

    public int part(int index) {
        if(dp[index] != -1)return dp[index];
        if(index == 0) dp[index] = 1;
        else if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2);
        while(dp[index] >= Mod.mod) dp[index] -= Mod.mod;
        return dp[index];
    }
} Dp public static int[] dp; dp public Dp (int num) {
        dp = new int[num];
        for(int i = 0; i < num; i++)dp[i] = -1;
    } Dp {
        dp = new int[num];
        for(int i = 0; i < num; i++)dp[i] = -1;
    } dp = new int[num] dp new int[num] num for(int i = 0; i < num; i++)dp[i] = -1; int i = 0; int i = 0; i 0 i < num i num i++ i++ i dp[i] = -1; dp[i] = -1 dp[i] dp i -1 1 int num num public int part(int index) {
        if(dp[index] != -1)return dp[index];
        if(index == 0) dp[index] = 1;
        else if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2);
        while(dp[index] >= Mod.mod) dp[index] -= Mod.mod;
        return dp[index];
    } part {
        if(dp[index] != -1)return dp[index];
        if(index == 0) dp[index] = 1;
        else if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2);
        while(dp[index] >= Mod.mod) dp[index] -= Mod.mod;
        return dp[index];
    } if(dp[index] != -1)return dp[index]; dp[index] != -1 dp[index] dp index -1 1 return dp[index]; dp[index] dp index if(index == 0) dp[index] = 1;
        else if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2); index == 0 index 0 dp[index] = 1 dp[index] dp index 1 if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2); index == 1 index 1 dp[index] = 1 dp[index] dp index 1 dp[index] = part(index-1) + part(index-2) dp[index] dp index part(index-1) + part(index-2) part(index-1) part index-1 index 1 part(index-2) part index-2 index 2 while(dp[index] >= Mod.mod) dp[index] -= Mod.mod; dp[index] >= Mod.mod dp[index] dp index Mod.mod Mod Mod.mod dp[index] -= Mod.mod dp[index] dp index Mod.mod Mod Mod.mod return dp[index]; dp[index] dp index int index index class Mod{
    static int mod = 1000000007;
} Mod static int mod = 1000000007; mod 1000000007
import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int stepNum = sc.nextInt();
		int brokenNum = sc.nextInt();
		int[] brokenSteps = new int[brokenNum];
		for(int i = 0; i < brokenNum; i++)brokenSteps[i] = sc.nextInt();
        
        Dp dp = new Dp(stepNum+1);
        for(int index : brokenSteps) Dp.dp[index] = 0;
        int ans = dp.part(stepNum);

		System.out.println(ans);
    }
}

class Dp {
    public static int[] dp;
    public Dp (int num) {
        dp = new int[num];
        for(int i = 0; i < num; i++)dp[i] = -1;
    }

    public int part(int index) {
        if(dp[index] != -1)return dp[index];
        if(index == 0) dp[index] = 1;
        else if(index == 1) dp[index] = 1;
        else dp[index] = part(index-1) + part(index-2);
        while(dp[index] >= Mod.mod) dp[index] -= Mod.mod;
        return dp[index];
    }
}

class Mod{
    static int mod = 1000000007;
}