

import java.util.Scanner;

public class Main {
	static long fact[] = new long[300000];
	static long factInv[] = new long[300000];

	public static void main(String[] args) {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	}
	static long repeatablePow(int x, int n, int mod){
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	}


	//今回はnが大きすぎるがa,b<=2*10^5なのでこちらを使う
//	static long combination2(int n, int b, int mod){
//		if(b == 1){
//			return n;
//		}
//
//		long result = 1;
//
//		for(int i = 1; i <= b ; i++){
//			result *= (n - i + 1);
//			result %= mod;
//		}
//
//		result *= factInv[b];
//
//		return result % mod;
//	}
	static long combination(int a, int b, int mod){ //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static long fact[] = new long[300000];
	static long factInv[] = new long[300000];

	public static void main(String[] args) {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	}
	static long repeatablePow(int x, int n, int mod){
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	}


	//今回はnが大きすぎるがa,b<=2*10^5なのでこちらを使う
//	static long combination2(int n, int b, int mod){
//		if(b == 1){
//			return n;
//		}
//
//		long result = 1;
//
//		for(int i = 1; i <= b ; i++){
//			result *= (n - i + 1);
//			result %= mod;
//		}
//
//		result *= factInv[b];
//
//		return result % mod;
//	}
	static long combination(int a, int b, int mod){ //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	}
} Main static long fact[] = new long[300000]; fact new long[300000] 300000 static long factInv[] = new long[300000]; factInv new long[300000] 300000 public static void main(String[] args) {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	} main {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	} final int MOD = 1_000_000_000 + 7; MOD 1_000_000_000 + 7 1_000_000_000 7 fact[0] = 1 fact[0] fact 0 1 factInv[0] = 1 factInv[0] factInv 0 1 for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		} int i = 0; int i = 0; i 0 i < fact.length - 1 i fact.length - 1 fact.length fact fact.length 1 i++ i++ i {
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		} {
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		} fact[i+1] = fact[i]*(i+1) % MOD fact[i+1] fact i+1 i 1 fact[i]*(i+1) % MOD fact[i]*(i+1) fact[i] fact i (i+1) i 1 MOD factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD) factInv[i+1] factInv i+1 i 1 (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD) factInv[i]*repeatablePow(i+1, MOD-2, MOD) factInv[i] factInv i repeatablePow(i+1, MOD-2, MOD) repeatablePow i+1 i 1 MOD-2 MOD 2 MOD MOD 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 broken[] = new boolean[n + 1]; broken new boolean[n + 1] n + 1 n 1 for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			broken[sc.nextInt()] = true;
		} {
			broken[sc.nextInt()] = true;
		} broken[sc.nextInt()] = true broken[sc.nextInt()] broken sc.nextInt() sc.nextInt sc true for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		} {
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		} if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			} broken[i] && broken[i - 1] broken[i] broken i broken[i - 1] broken i - 1 i 1 {
				System.out.println(0);
				return;
			} System.out.println(0) System.out.println System.out System System.out 0 return; long result[] = new long[n + 1]; result new long[n + 1] n + 1 n 1 result[0] = 1 result[0] result 0 1 if(!broken[1]){
			result[1] = 1;
		} !broken[1] broken[1] broken 1 {
			result[1] = 1;
		} result[1] = 1 result[1] result 1 1 for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		} int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		} {
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		} if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			} broken[i] broken i {
				result[i] = 0;
			} result[i] = 0 result[i] result i 0 {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			} result[i] = (result[i - 1] + result[i - 2])%MOD result[i] result i (result[i - 1] + result[i - 2])%MOD (result[i - 1] + result[i - 2]) result[i - 1] result i - 1 i 1 result[i - 2] result i - 2 i 2 MOD System.out.println(result[n]) System.out.println System.out System System.out result[n] result n String[] args args static long repeatablePow(int x, int n, int mod){
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	} repeatablePow {
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	} if(n == 0){
			return 1;
		} n == 0 n 0 {
			return 1;
		} return 1; 1 long result = repeatablePow((int)((long)x*x%mod), n/2, mod); result repeatablePow((int)((long)x*x%mod), n/2, mod) repeatablePow (int)((long)x*x%mod) (long)x*x (long)x x mod n/2 n 2 mod if(n % 2 == 1){
			result = result*x%mod;
		} n % 2 == 1 n % 2 n 2 1 {
			result = result*x%mod;
		} result = result*x%mod result result*x%mod result*x result x mod return result; result int x x int n n int mod mod //今回はnが大きすぎるがa,b<=2*10^5なのでこちらを使う
//	static long combination2(int n, int b, int mod){
//		if(b == 1){
//			return n;
//		}
//
//		long result = 1;
//
//		for(int i = 1; i <= b ; i++){
//			result *= (n - i + 1);
//			result %= mod;
//		}
//
//		result *= factInv[b];
//
//		return result % mod;
//	}
	static long combination(int a, int b, int mod){ //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	} combination { //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	} if(a == 0 && b == 0)return 1; a == 0 && b == 0 a == 0 a 0 b == 0 b 0 return 1; 1 if(a < b || a < 0)return 0; a < b || a < 0 a < b a b a < 0 a 0 return 0; 0 long tmp = factInv[a - b]* factInv[b] % mod; tmp factInv[a - b]* factInv[b] % mod factInv[a - b]* factInv[b] factInv[a - b] factInv a - b a b factInv[b] factInv b mod return tmp * fact[a] % mod; tmp * fact[a] % mod tmp * fact[a] tmp fact[a] fact a mod int a a int b b int mod mod public class Main {
	static long fact[] = new long[300000];
	static long factInv[] = new long[300000];

	public static void main(String[] args) {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	}
	static long repeatablePow(int x, int n, int mod){
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	}


	//今回はnが大きすぎるがa,b<=2*10^5なのでこちらを使う
//	static long combination2(int n, int b, int mod){
//		if(b == 1){
//			return n;
//		}
//
//		long result = 1;
//
//		for(int i = 1; i <= b ; i++){
//			result *= (n - i + 1);
//			result %= mod;
//		}
//
//		result *= factInv[b];
//
//		return result % mod;
//	}
	static long combination(int a, int b, int mod){ //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	}
} public class Main {
	static long fact[] = new long[300000];
	static long factInv[] = new long[300000];

	public static void main(String[] args) {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	}
	static long repeatablePow(int x, int n, int mod){
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	}


	//今回はnが大きすぎるがa,b<=2*10^5なのでこちらを使う
//	static long combination2(int n, int b, int mod){
//		if(b == 1){
//			return n;
//		}
//
//		long result = 1;
//
//		for(int i = 1; i <= b ; i++){
//			result *= (n - i + 1);
//			result %= mod;
//		}
//
//		result *= factInv[b];
//
//		return result % mod;
//	}
	static long combination(int a, int b, int mod){ //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	}
} Main


import java.util.Scanner;

public class Main {
	static long fact[] = new long[300000];
	static long factInv[] = new long[300000];

	public static void main(String[] args) {
		final int MOD = 1_000_000_000 + 7;

		fact[0] = 1;
		factInv[0] = 1;
		for(int i = 0; i < fact.length - 1; i++){
			fact[i+1] = fact[i]*(i+1) % MOD; // n!(mod M)
	        factInv[i+1] = (int)(factInv[i]*repeatablePow(i+1, MOD-2, MOD) % MOD);
		}

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();

		boolean broken[] = new boolean[n + 1];

		for(int i = 0; i < m; i++){
			broken[sc.nextInt()] = true;
		}

		//2連続で壊れていたらたどり着けない
		for(int i = 1; i < n; i++){
			if(broken[i] && broken[i - 1]){
				System.out.println(0);
				return;
			}
		}

		long result[] = new long[n + 1];
		result[0] = 1;

		if(!broken[1]){
			result[1] = 1;
		}
		for(int i = 2; i <= n; i++){
			if(broken[i]){
				result[i] = 0;
			}
			else {
				result[i] = (result[i - 1] + result[i - 2])%MOD;
			}
		}

		System.out.println(result[n]);
	}
	static long repeatablePow(int x, int n, int mod){
		if(n == 0){
			return 1;
		}
		long result = repeatablePow((int)((long)x*x%mod), n/2, mod);
		if(n % 2 == 1){
			result = result*x%mod;
		}
		return result;
	}


	//今回はnが大きすぎるがa,b<=2*10^5なのでこちらを使う
//	static long combination2(int n, int b, int mod){
//		if(b == 1){
//			return n;
//		}
//
//		long result = 1;
//
//		for(int i = 1; i <= b ; i++){
//			result *= (n - i + 1);
//			result %= mod;
//		}
//
//		result *= factInv[b];
//
//		return result % mod;
//	}
	static long combination(int a, int b, int mod){ //aCbをmod計算
	    if(a == 0 && b == 0)return 1;
	    if(a < b || a < 0)return 0;

	    long tmp = factInv[a - b]* factInv[b] % mod;
	    return tmp * fact[a] % mod;
	}
}
