import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	}

} Main public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	} try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		} {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc long[] dp = new long[N + 3]; dp new long[N + 3] N + 3 N 3 boolean[] broken = new boolean[N + 3]; broken new boolean[N + 3] N + 3 N 3 int mul = 1000000007; mul 1000000007 for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			} {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc broken[a] = true broken[a] broken a true if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				} broken[a - 1] && broken[a] broken[a - 1] broken a - 1 a 1 broken[a] broken a {
					System.out.println(0);
					return;
				} System.out.println(0) System.out.println System.out System System.out 0 return; dp[0] = 1 dp[0] dp 0 1 for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			} {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			} if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				} i == 1 i 1 {
					if (!broken[i]) dp[i]++;
				} if (!broken[i]) dp[i]++; !broken[i] broken[i] broken i dp[i]++ dp[i] dp i {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				} if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul; broken[i] broken i dp[i] = 0 dp[i] dp i 0 dp[i] = (dp[i - 1] + dp[i - 2]) % mul dp[i] dp i (dp[i - 1] + dp[i - 2]) % mul (dp[i - 1] + dp[i - 2]) dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 mul 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) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	}

} public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();
			int M = sc.nextInt();
			long[] dp = new long[N + 3];
			boolean[] broken = new boolean[N + 3];
			int mul = 1000000007;
			for (int i = 0; i < M; i++) {
				int a = sc.nextInt();
				broken[a] = true;
				if (broken[a - 1] && broken[a]) {
					System.out.println(0);
					return;
				}
			}
			dp[0] = 1;
			for (int i = 1; i <= N; i++) {
				if (i == 1) {
					if (!broken[i]) dp[i]++;
				}
				else {
					if (broken[i]) dp[i] = 0;
					else dp[i] = (dp[i - 1] + dp[i - 2]) % mul;
				}
			}
			System.out.println(dp[N]);
		}
	}

}