import java.util.Scanner;
import java.util.Comparator;
import java.util.Arrays;
import java.util.ArrayList;



public class Main {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	}
} import java.util.Scanner; Scanner java.util import java.util.Comparator; Comparator java.util import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util public class Main {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		} M == 0 M 0 {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		} if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				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 {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			} long [] ans = new long[N+1]; ans new long[N+1] N+1 N 1 ans[0] = 1 ans[0] ans 0 1 ans[1] = 1 ans[1] ans 1 1 for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				} int i = 2; int i = 2; i 2 i<N+1 i N+1 N 1 i++ i++ i {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				} {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				} ans[i]=(ans[i-1]+ans[i-2])%1000000007 ans[i] ans i (ans[i-1]+ans[i-2])%1000000007 (ans[i-1]+ans[i-2]) ans[i-1] ans i-1 i 1 ans[i-2] ans i-2 i 2 1000000007 System.out.println(ans[N]) System.out.println System.out System System.out ans[N] ans N {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		} int [] a = new int[M]; a new int[M] M for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			} int i = 0; int i = 0; i 0 i< M i M i++ i++ i {
				a[i] = sc.nextInt();
			} {
				a[i] = sc.nextInt();
			} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				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 {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			} long [] ans = new long[N+1]; ans new long[N+1] N+1 N 1 ans[0] = 1 ans[0] ans 0 1 int tmp = 0; tmp 0 if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				} a[tmp]==1 a[tmp] a tmp 1 {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				} ans[1] = 0 ans[1] ans 1 0 if(M-1 != 0) {
						tmp++;
					} M-1 != 0 M-1 M 1 0 {
						tmp++;
					} tmp++ tmp {
					ans[1] = 1;
				} ans[1] = 1 ans[1] ans 1 1 for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				} int i = 2; int i = 2; i 2 i<N+1 i N+1 N 1 i++ i++ i {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				} {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				} if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					} a[tmp]==i a[tmp] a tmp i {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					} ans[i] = 0 ans[i] ans i 0 if(tmp<M-1) {
							tmp++;
						} tmp<M-1 tmp M-1 M 1 {
							tmp++;
						} tmp++ tmp {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					} ans[i]=(ans[i-1]+ans[i-2])%1000000007 ans[i] ans i (ans[i-1]+ans[i-2])%1000000007 (ans[i-1]+ans[i-2]) ans[i-1] ans i-1 i 1 ans[i-2] ans i-2 i 2 1000000007 System.out.println(ans[N]) System.out.println System.out System System.out ans[N] ans N String[] args args public class Main {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	}
} public class Main {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	}
} Main
import java.util.Scanner;
import java.util.Comparator;
import java.util.Arrays;
import java.util.ArrayList;



public class Main {

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M == 0) {
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				ans[1] = 1;

				for (int i = 2; i<N+1;i++) {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
				}
				System.out.println(ans[N]);
			}
		}
		else {
			int [] a = new int[M];
			for (int i = 0; i< M; i++) {
				a[i] = sc.nextInt();
			}
			if(N == 1) {
				System.out.println(1);
			}
			else {
				long [] ans = new long[N+1];
				ans[0] = 1;
				int tmp = 0;
				if(a[tmp]==1) {
					ans[1] = 0;
					if(M-1 != 0) {
						tmp++;
					}
					
				}
				else {
					ans[1] = 1;
				}
				for (int i = 2; i<N+1;i++) {
					if(a[tmp]==i) {
						ans[i] = 0;
						if(tmp<M-1) {
							tmp++;
						}
					}
					else {
						ans[i]=(ans[i-1]+ans[i-2])%1000000007;
					}
				}
				System.out.println(ans[N]);
			}
		}
		
	}
}
