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[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(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[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(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[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(dp[N]);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(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[] input = new int[M]; input new int[M] M for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			input[i] = sc.nextInt();
		} {
			input[i] = sc.nextInt();
		} input[i] = sc.nextInt() input[i] input i sc.nextInt() sc.nextInt sc int[] dp = new int[N + 1]; dp new int[N + 1] N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 int pointer = 0; pointer 0 if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		} pointer < M && input[pointer] == 1 pointer < M pointer M input[pointer] == 1 input[pointer] input pointer 1 {
			dp[1] = 0;
			pointer++;
		} dp[1] = 0 dp[1] dp 1 0 pointer++ pointer {
			dp[1] = 1;
		} dp[1] = 1 dp[1] dp 1 1 for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		} int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		} {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		} if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			} pointer < M && input[pointer] == i pointer < M pointer M input[pointer] == i input[pointer] input pointer i {
				dp[i] = 0;
				pointer++;
			} dp[i] = 0 dp[i] dp i 0 pointer++ pointer {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			} dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007 dp[i] dp i (dp[i - 2] + dp[i - 1]) % 1000000007 (dp[i - 2] + dp[i - 1]) dp[i - 2] dp i - 2 i 2 dp[i - 1] dp i - 1 i 1 1000000007 System.out.print(dp[N]) System.out.print 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[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(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[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(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[] input = new int[M];
		for (int i = 0; i < M; i++) {
			input[i] = sc.nextInt();
		}
		int[] dp = new int[N + 1];
		dp[0] = 1;
		int pointer = 0;
		if (pointer < M && input[pointer] == 1) {
			dp[1] = 0;
			pointer++;
		} else {
			dp[1] = 1;
		}
		for (int i = 2; i <= N; i++) {
			if (pointer < M && input[pointer] == i) {
				dp[i] = 0;
				pointer++;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
			}
		}
		System.out.print(dp[N]);
	}
}
