import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	} main {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan boolean[] flg = new boolean[N + 1]; flg new boolean[N + 1] N + 1 N 1 for(int i = 0; i <= N; i++) {
			flg[i] = true;
		} int i = 0; int i = 0; i 0 i <= N i N i++ i++ i {
			flg[i] = true;
		} {
			flg[i] = true;
		} flg[i] = true flg[i] flg i true for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			flg[scan.nextInt()] = false;
		} {
			flg[scan.nextInt()] = false;
		} flg[scan.nextInt()] = false flg[scan.nextInt()] flg scan.nextInt() scan.nextInt scan false int[] b = new int[N + 1]; b new int[N + 1] N + 1 N 1 b[0] = 1 b[0] b 0 1 b[1] = 1 b[1] b 1 1 int mod = 1000000007; mod 1000000007 for(int i = 2; i <= N; i++)
		{
			b[i] = 0;
			if(flg[i - 2]) {
				b[i] += b[i -2];
			}
			if(flg[i - 1]) {
				b[i] += b[i -1];
			}
			b[i] %= mod;
		} int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
			b[i] = 0;
			if(flg[i - 2]) {
				b[i] += b[i -2];
			}
			if(flg[i - 1]) {
				b[i] += b[i -1];
			}
			b[i] %= mod;
		} {
			b[i] = 0;
			if(flg[i - 2]) {
				b[i] += b[i -2];
			}
			if(flg[i - 1]) {
				b[i] += b[i -1];
			}
			b[i] %= mod;
		} b[i] = 0 b[i] b i 0 if(flg[i - 2]) {
				b[i] += b[i -2];
			} flg[i - 2] flg i - 2 i 2 {
				b[i] += b[i -2];
			} b[i] += b[i -2] b[i] b i b[i -2] b i -2 i 2 if(flg[i - 1]) {
				b[i] += b[i -1];
			} flg[i - 1] flg i - 1 i 1 {
				b[i] += b[i -1];
			} b[i] += b[i -1] b[i] b i b[i -1] b i -1 i 1 b[i] %= mod b[i] b i mod System.out.println(b[N]) System.out.println System.out System System.out b[N] b N String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

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

		boolean[] flg = new boolean[N + 1];
		for(int i = 0; i <= N; i++) {
			flg[i] = true;
		}
		for(int i = 0; i < M; i++) {
			flg[scan.nextInt()] = false;
		}
		int[] b = new int[N + 1];
		b[0] = 1;
		b[1] = 1;

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

		System.out.println(b[N]);
	}
}