
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[n]);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[n]);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[n]);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[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 int[] a = new int[n]; a new int[n] n boolean[] jdg = new boolean[n+1]; jdg new boolean[n+1] n+1 n 1 long mod = 1000000007; mod 1000000007 for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		} {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc jdg[a[i]] = true jdg[a[i]] jdg a[i] a i true long[] dp = new long[n+1]; dp new long[n+1] n+1 n 1 dp[0] = 1 dp[0] dp 0 1 for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		} {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		} for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			} int j = i+1; int j = i+1; j i+1 i 1 j <= Math.min(n, i+2) j Math.min(n, i+2) Math.min Math n i+2 i 2 j++ j++ j {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			} {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			} if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				} jdg[j] == false jdg[j] jdg j false {
					dp[j] += dp[i];
					dp[j] %= mod;
				} dp[j] += dp[i] dp[j] dp j dp[i] dp i dp[j] %= mod dp[j] dp j mod System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[n]);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[n]);
	}
} Main

import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[n];
		boolean[] jdg = new boolean[n+1];
		long mod = 1000000007;
		for(int i = 0; i < m; i++) {
			a[i] = sc.nextInt();
			jdg[a[i]] = true;
		}
		long[] dp = new long[n+1];
		dp[0] = 1;
		for(int i = 0; i < n; i++) {
			for(int j = i+1; j <= Math.min(n, i+2); j++) {
				if(jdg[j] == false) {
					dp[j] += dp[i];
					dp[j] %= mod;
				}
			}
		}
		System.out.println(dp[n]);
	}
}
