import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long [] ans = new long [a+1]; ans new long [a+1] a+1 a 1 if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);} b>0 b 0 {int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);} int [] in = new int [b]; in new int [b] b for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            } int i=0; int i=0; i 0 i<b i b i++ i++ i {
                             in[i] = sc.nextInt();
                            } {
                             in[i] = sc.nextInt();
                            } in[i] = sc.nextInt() in[i] in i sc.nextInt() sc.nextInt sc int c = 0; c 0 long mod = 1000000007; mod 1000000007 ans [0] = 1 ans [0] ans 0 1 if(in[c]==1){c++;}
        else{ans[1]=1;} in[c]==1 in[c] in c 1 {c++;} c++ c {ans[1]=1;} ans[1]=1 ans[1] ans 1 1 for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             } int i=2; int i=2; i 2 i<=a i a i++ i++ i {if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             } {if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             } if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;} c<b && in[c]==i c<b c b in[c]==i in[c] in c i {c++;} c++ c {ans[i]=(ans[i-1]+ans[i-2])%mod;} ans[i]=(ans[i-1]+ans[i-2])%mod ans[i] ans i (ans[i-1]+ans[i-2])%mod (ans[i-1]+ans[i-2]) ans[i-1] ans i-1 i 1 ans[i-2] ans i-2 i 2 mod System.out.println(ans[a]) System.out.println System.out System System.out ans[a] ans a {long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);} long mod = 1000000007; mod 1000000007 ans [0] = 1 ans [0] ans 0 1 ans [1] = 1 ans [1] ans 1 1 for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             } int i=2; int i=2; i 2 i<=a i a i++ i++ i {
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             } {
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             } ans[i]=(ans[i-1]+ans[i-2])%mod ans[i] ans i (ans[i-1]+ans[i-2])%mod (ans[i-1]+ans[i-2]) ans[i-1] ans i-1 i 1 ans[i-2] ans i-2 i 2 mod System.out.println(ans[a]) System.out.println System.out System System.out ans[a] ans a String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(c<b && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);}
        else{long mod = 1000000007;
        ans [0] = 1;
        ans [1] = 1;
        for(int i=2;i<=a;i++){
                              ans[i]=(ans[i-1]+ans[i-2])%mod;
                             }       
		System.out.println(ans[a]);}
	}
}