import 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();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		System.out.println(ans[N]);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		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();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		System.out.println(ans[N]);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		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 Integer a[] = new Integer[M]; a new Integer[M] M long ans[] = new long[N + 1]; ans new long[N + 1] N + 1 N 1 Arrays.fill(ans, 0) Arrays.fill Arrays ans 0 for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		} {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc ans[a[i]] = -1 ans[a[i]] ans a[i] a i -1 1 ans[0] = (long)1 ans[0] ans 0 (long)1 if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		} ans[1] != -1 ans[1] ans 1 -1 1 {
			ans[1] = (long)1;
		} ans[1] = (long)1 ans[1] ans 1 (long)1 {
			ans[1] = (long)0;
		} ans[1] = (long)0 ans[1] ans 1 (long)0 long p = 1000000007; p 1000000007 for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		} int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		} {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		} if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			} ans[i] != -1 ans[i] ans i -1 1 {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				} ans[i - 1] != -1 ans[i - 1] ans i - 1 i 1 -1 1 {
					ans[i] = ans[i - 1] % p;
				} ans[i] = ans[i - 1] % p ans[i] ans i ans[i - 1] % p ans[i - 1] ans i - 1 i 1 p if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				} ans[i - 2] != -1 ans[i - 2] ans i - 2 i 2 -1 1 {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				} ans[i] = (ans[i] + ans[i - 2]) % p ans[i] ans i (ans[i] + ans[i - 2]) % p (ans[i] + ans[i - 2]) ans[i] ans i ans[i - 2] ans i - 2 i 2 p {
				ans[i] = (long)0;
			} ans[i] = (long)0 ans[i] ans i (long)0 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();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		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();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		System.out.println(ans[N]);
	}
} Main
import 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();
		Integer a[] = new Integer[M];
		long ans[] = new long[N + 1];
		Arrays.fill(ans, 0);
		for(int i = 0; i < M; i++) {
			a[i] = sc.nextInt();
			ans[a[i]] = -1;
		}
		ans[0] = (long)1;
		if(ans[1] != -1) {
			ans[1] = (long)1;
		} else {
			ans[1] = (long)0;
		}
		
		long p = 1000000007;
		for(int i = 2; i <= N; i++) {
			if(ans[i] != -1) {
				if(ans[i - 1] != -1) {
					ans[i] = ans[i - 1] % p;
				}
				if(ans[i - 2] != -1) {
					ans[i] = (ans[i] + ans[i - 2]) % p;
				}
			} else {
				ans[i] = (long)0;
			}
		}
		System.out.println(ans[N]);
	}
}
