import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	}

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	} main {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int mod = 1000000007; mod 1000000007 int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int[] ans = new int[n+1]; ans new int[n+1] n+1 n 1 for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			ans[in.nextInt()] = -1;
		} {
			ans[in.nextInt()] = -1;
		} ans[in.nextInt()] = -1 ans[in.nextInt()] ans in.nextInt() in.nextInt in -1 1 ans[0] = 1 ans[0] ans 0 1 if(ans[1]==0) ans[1] = 1; ans[1]==0 ans[1] ans 1 0 ans[1] = 1 ans[1] ans 1 1 for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		} int i=2; int i=2; i 2 i<=n i n i++ i++ i {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		} {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		} if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod; ans[i]==-1 ans[i] ans i -1 1 continue; if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod; ans[i-1]==-1 && ans[i-2]==-1 ans[i-1]==-1 ans[i-1] ans i-1 i 1 -1 1 ans[i-2]==-1 ans[i-2] ans i-2 i 2 -1 1 ans[i] = 0 ans[i] ans i 0 if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod; ans[i-1]==-1 ans[i-1] ans i-1 i 1 -1 1 ans[i] = ans[i-2] ans[i] ans i ans[i-2] ans i-2 i 2 if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod; ans[i-2]==-1 ans[i-2] ans i-2 i 2 -1 1 ans[i] = ans[i-1] ans[i] ans i ans[i-1] ans i-1 i 1 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[n]) System.out.println System.out System System.out ans[n] ans n in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int mod = 1000000007;
		int n = in.nextInt();
		int m = in.nextInt();
		int[] ans = new int[n+1];
		for(int i=0;i<m;i++) {
			ans[in.nextInt()] = -1;
		}
		ans[0] = 1;
		if(ans[1]==0) ans[1] = 1;
		for(int i=2;i<=n;i++) {
			if(ans[i]==-1) continue;
			else if(ans[i-1]==-1 && ans[i-2]==-1) ans[i] = 0;
			else if(ans[i-1]==-1) ans[i] = ans[i-2];
			else if(ans[i-2]==-1) ans[i] = ans[i-1];
			else ans[i] = (ans[i-1] + ans[i-2]) % mod;
		}
		System.out.println(ans[n]);
		in.close();

	}

}
