import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	}
} import java.util.Scanner; Scanner 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();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	} 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[m + 1]; a new int[m + 1] m + 1 m 1 int[] cnt = new int[n + 1]; cnt new int[n + 1] n + 1 n 1 cnt[0] = 1 cnt[0] cnt 0 1 final int MOD = 1000000007; MOD 1000000007 for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		} int i = 1; int i = 1; i 1 i < a.length i a.length a a.length i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int num = 1; num 1 if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		} m > 0 m 0 {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			} a[1] == 1 a[1] a 1 1 {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} cnt[1] = 0 cnt[1] cnt 1 0 if (num < m) {
					num++;
				} num < m num m {
					num++;
				} num++ num {
				cnt[1] = 1;
			} cnt[1] = 1 cnt[1] cnt 1 1 {
			cnt[1] = 1;
		} cnt[1] = 1 cnt[1] cnt 1 1 for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		} int i = 2; int i = 2; i 2 i < cnt.length i cnt.length cnt cnt.length i++ i++ i {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		} {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		} cnt[i] = cnt[i - 2] + cnt[i - 1] cnt[i] cnt i cnt[i - 2] + cnt[i - 1] cnt[i - 2] cnt i - 2 i 2 cnt[i - 1] cnt i - 1 i 1 cnt[i] %= MOD cnt[i] cnt i MOD if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			} m > 0 m 0 {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			} if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				} i == a[num] i a[num] a num {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				} cnt[i] = 0 cnt[i] cnt i 0 if (num < m) {
						num++;
					} num < m num m {
						num++;
					} num++ num System.out.println(cnt[n]) System.out.println System.out System System.out cnt[n] cnt n sc.close() sc.close sc 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();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[m + 1];
		int[] cnt = new int[n + 1];
		cnt[0] = 1;
		final int MOD = 1000000007;

		for (int i = 1; i < a.length; i++) {
			a[i] = sc.nextInt();
		}

		int num = 1;
		if (m > 0) {
			if (a[1] == 1) {
				cnt[1] = 0;
				if (num < m) {
					num++;
				}
			} else {
				cnt[1] = 1;
			}
		} else {
			cnt[1] = 1;
		}

		for (int i = 2; i < cnt.length; i++) {

			cnt[i] = cnt[i - 2] + cnt[i - 1];
			cnt[i] %= MOD;
			if (m > 0) {
				if (i == a[num]) {
					cnt[i] = 0;
					if (num < m) {
						num++;
					}
				}
			}

		}

		System.out.println(cnt[n]);
		sc.close();
	}
}