import java.io.InputStream;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	} _main {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	} Scanner sc = new Scanner(in); sc new Scanner(in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc boolean[] a = new boolean[N + 1]; a new boolean[N + 1] N + 1 N 1 Arrays.fill(a, true) Arrays.fill Arrays a true for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		} int i = 1; int i = 1; i 1 i <= M i M i++ i++ i {
			a[sc.nextInt()] = false;
		} {
			a[sc.nextInt()] = false;
		} a[sc.nextInt()] = false a[sc.nextInt()] a sc.nextInt() sc.nextInt sc false int[] ans = new int[N + 1]; ans new int[N + 1] N + 1 N 1 ans[0] = 1 ans[0] ans 0 1 ans[1] = 1 ans[1] ans 1 1 for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		} int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		} {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		} ans[i] = 0 ans[i] ans i 0 if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			} a[i - 2] a i - 2 i 2 {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			} ans[i] += ans[i - 2] ans[i] ans i ans[i - 2] ans i - 2 i 2 ans[i] %= 1000000007 ans[i] ans i 1000000007 if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			} a[i - 1] a i - 1 i 1 {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			} ans[i] += ans[i - 1] ans[i] ans i ans[i - 1] ans i - 1 i 1 ans[i] %= 1000000007 ans[i] ans i 1000000007 out.println(ans[N]) out.println out ans[N] ans N sc.close() sc.close sc String[] args args public static void main(String[] args) {
		new Main()._main(args);
	} main {
		new Main()._main(args);
	} new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();
		int M = sc.nextInt();

		boolean[] a = new boolean[N + 1];
		Arrays.fill(a, true);
		for (int i = 1; i <= M; i++) {
			a[sc.nextInt()] = false;
		}

		int[] ans = new int[N + 1];
		ans[0] = 1;
		ans[1] = 1;

		for (int i = 2; i <= N; i++) {
			ans[i] = 0;
			if (a[i - 2]) {
				ans[i] += ans[i - 2];
				ans[i] %= 1000000007;
			}
			if (a[i - 1]) {
				ans[i] += ans[i - 1];
				ans[i] %= 1000000007;
			}

		}

		out.println(ans[N]);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

}
