import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int mod = 1_000_000_007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M];
		int[] flag = new int[2];
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		}
		if (N==1) {
			System.out.println(1);
		} else {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		}
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int mod = 1_000_000_007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M];
		int[] flag = new int[2];
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		}
		if (N==1) {
			System.out.println(1);
		} else {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int mod = 1_000_000_007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M];
		int[] flag = new int[2];
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		}
		if (N==1) {
			System.out.println(1);
		} else {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int mod = 1_000_000_007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M];
		int[] flag = new int[2];
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		}
		if (N==1) {
			System.out.println(1);
		} else {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int mod = 1_000_000_007; mod 1_000_000_007 int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int[] a = new int[M]; a new int[M] M int[] flag = new int[2]; flag new int[2] 2 HashSet<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for (int i=0;i<M;i++) {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		} {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc set.add(a[i]) set.add set a[i] a i if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			} a[i]==1 a[i] a i 1 {
				flag[0]=1;
			} flag[0]=1 flag[0] flag 0 1 if(a[i]==2) {
				flag[1]=1;
			} a[i]==2 a[i] a i 2 {
				flag[1]=1;
			} flag[1]=1 flag[1] flag 1 1 if (N==1) {
			System.out.println(1);
		} else {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		} N==1 N 1 {
			System.out.println(1);
		} System.out.println(1) System.out.println System.out System System.out 1 {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		} int[] ans = new int[N+1]; ans new int[N+1] N+1 N 1 if (flag[0]==0) {
				ans[1]=1;
			} flag[0]==0 flag[0] flag 0 0 {
				ans[1]=1;
			} ans[1]=1 ans[1] ans 1 1 if (flag[1]==0) {
				ans[2]=1;
			} flag[1]==0 flag[1] flag 1 0 {
				ans[2]=1;
			} ans[2]=1 ans[2] ans 2 1 for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			} int i=0; int i=0; i 0 i<N i N i++ i++ i {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			} {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			} if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				} i!=N-1 i N-1 N 1 {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				} if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					} !set.contains(i+2) set.contains(i+2) set.contains set i+2 i 2 {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					} ans[i+2]=(ans[i+2]+ans[i])%mod ans[i+2] ans i+2 i 2 (ans[i+2]+ans[i])%mod (ans[i+2]+ans[i]) ans[i+2] ans i+2 i 2 ans[i] ans i mod if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				} !set.contains(i+1) set.contains(i+1) set.contains set i+1 i 1 {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				} ans[i+1]=(ans[i+1]+ans[i])%mod ans[i+1] ans i+1 i 1 (ans[i+1]+ans[i])%mod (ans[i+1]+ans[i]) ans[i+1] ans i+1 i 1 ans[i] ans i mod System.out.println(ans[N]) System.out.println System.out System System.out ans[N] ans N String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int mod = 1_000_000_007;
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M];
		int[] flag = new int[2];
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			a[i] = sc.nextInt();
			set.add(a[i]);
			if (a[i]==1) {
				flag[0]=1;
			} else if(a[i]==2) {
				flag[1]=1;
			}
		}
		if (N==1) {
			System.out.println(1);
		} else {
			int[] ans = new int[N+1];
			if (flag[0]==0) {
				ans[1]=1;
			}
			if (flag[1]==0) {
				ans[2]=1;
			}
			for (int i=0;i<N;i++) {
				if (i!=N-1) {
					if (!set.contains(i+2)) {
						ans[i+2]=(ans[i+2]+ans[i])%mod;
					}
				}
				if (!set.contains(i+1)) {
					ans[i+1]=(ans[i+1]+ans[i])%mod;
				}
			}

			System.out.println(ans[N]);
		}
	}
}