import java.util.*;

public class Main {
	public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	}

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	static final int MOD = 1000000007;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[N]);
	}
} import java.util.*; util.* java public class Main {
	public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	}

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	static final int MOD = 1000000007;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[N]);
	}
} Main static final int MOD = 1000000007; MOD 1000000007 public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	} printArray {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	} for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			System.out.print(a[i] + ", ");
		} {
			System.out.print(a[i] + ", ");
		} System.out.print(a[i] + ", ") System.out.print System.out System System.out a[i] + ", " a[i] a i ", " System.out.println() System.out.println System.out System System.out int[] a a public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[N]);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[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 boolean[] B = new boolean[N + 1]; B new boolean[N + 1] N + 1 N 1 int[] A = new int[M]; A new int[M] M for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			int n = sc.nextInt();
			B[n] = true;
		} {
			int n = sc.nextInt();
			B[n] = true;
		} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc B[n] = true B[n] B n true int[] X = new int[N + 1]; X new int[N + 1] N + 1 N 1 X[0] = 1 X[0] X 0 1 X[1] = B[1] ? 0 : 1 X[1] X 1 B[1] ? 0 : 1 B[1] B 1 0 1 for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		} int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		} {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		} if (B[i]) continue; B[i] B i continue; X[i] = (X[i - 2] + X[i - 1]) % MOD X[i] X i (X[i - 2] + X[i - 1]) % MOD (X[i - 2] + X[i - 1]) X[i - 2] X i - 2 i 2 X[i - 1] X i - 1 i 1 MOD System.out.println(X[N]) System.out.println System.out System System.out X[N] X N String[] args args public class Main {
	public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	}

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	static final int MOD = 1000000007;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[N]);
	}
} public class Main {
	public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	}

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	static final int MOD = 1000000007;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[N]);
	}
} Main
import java.util.*;

public class Main {
	public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	}

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	static final int MOD = 1000000007;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] B = new boolean[N + 1];

		int[] A = new int[M];
		for (int i = 0; i < M; i++) {
			int n = sc.nextInt();
			B[n] = true;
		}

		int[] X = new int[N + 1];
		X[0] = 1;
		X[1] = B[1] ? 0 : 1;
		for (int i = 2; i <= N; i++) {
			if (B[i]) continue;
			X[i] = (X[i - 2] + X[i - 1]) % MOD;
		}
		// printArray(X);
		System.out.println(X[N]);
	}
}
