import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	} main {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N M; M N = sc.nextInt() N sc.nextInt() sc.nextInt sc M = sc.nextInt() M sc.nextInt() sc.nextInt sc int[] broken = new int[N + 1]; broken new int[N + 1] N + 1 N 1 for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			int a = sc.nextInt();
			broken[a] = 1;
		} {
			int a = sc.nextInt();
			broken[a] = 1;
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc broken[a] = 1 broken[a] broken a 1 int[] dp = new int[N + 2]; dp new int[N + 2] N + 2 N 2 dp[N] = 1 dp[N] dp N 1 for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		} int i = N - 1; int i = N - 1; i N - 1 N 1 i >= 0 i 0 i-- i-- i {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		} {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		} if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			} broken[i] == 1 broken[i] broken i 1 {
				dp[i] = 0;
				continue;
			} dp[i] = 0 dp[i] dp i 0 continue; dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007 dp[i] dp i (dp[i + 1] + dp[i + 2]) % 1000000007 (dp[i + 1] + dp[i + 2]) dp[i + 1] dp i + 1 i 1 dp[i + 2] dp i + 2 i 2 1000000007 System.out.println(dp[0]) System.out.println System.out System System.out dp[0] dp 0 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, M;
		N = sc.nextInt();
		M = sc.nextInt();
		int[] broken = new int[N + 1];
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt();
			broken[a] = 1;
		}

		int[] dp = new int[N + 2];
		dp[N] = 1;
		for(int i = N - 1; i >= 0; i--) {
			if (broken[i] == 1) {
				dp[i] = 0;
				continue;
			}
			dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
		}

		System.out.println(dp[0]);
	}
}