import java.util.ArrayList;
import java.util.Scanner;
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];
		int mod = 1000000007;
		for(int i = 0;i < m;i++){
			a[i] = sc.nextInt();
		}
		int[] dp = new int[n+1];
		dp[0] = 1;
		for(int i = 0;i < m;i++){
			dp[a[i]] = -1;
		}
		for(int i = 0;i <= n;i++){
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		}
		System.out.print(dp[n]%mod);




	}


	static boolean checkswitch(int bit,int[] k,ArrayList<ArrayList<Integer>> list,int[] p,int m){

		//		System.out.println("bit " + bit);

		for(int i = 0;i < m;i++){

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		}


		return true;

	}

	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}





}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return  otherpair.end - end;
	}
}

 import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util 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];
		int mod = 1000000007;
		for(int i = 0;i < m;i++){
			a[i] = sc.nextInt();
		}
		int[] dp = new int[n+1];
		dp[0] = 1;
		for(int i = 0;i < m;i++){
			dp[a[i]] = -1;
		}
		for(int i = 0;i <= n;i++){
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		}
		System.out.print(dp[n]%mod);




	}


	static boolean checkswitch(int bit,int[] k,ArrayList<ArrayList<Integer>> list,int[] p,int m){

		//		System.out.println("bit " + bit);

		for(int i = 0;i < m;i++){

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		}


		return true;

	}

	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}





} 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];
		int mod = 1000000007;
		for(int i = 0;i < m;i++){
			a[i] = sc.nextInt();
		}
		int[] dp = new int[n+1];
		dp[0] = 1;
		for(int i = 0;i < m;i++){
			dp[a[i]] = -1;
		}
		for(int i = 0;i <= n;i++){
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		}
		System.out.print(dp[n]%mod);




	} main {
		Scanner sc = new Scanner(System.in);			//文字の入力



		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] a = new int[m];
		int mod = 1000000007;
		for(int i = 0;i < m;i++){
			a[i] = sc.nextInt();
		}
		int[] dp = new int[n+1];
		dp[0] = 1;
		for(int i = 0;i < m;i++){
			dp[a[i]] = -1;
		}
		for(int i = 0;i <= n;i++){
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		}
		System.out.print(dp[n]%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 int[] a = new int[m]; a new int[m] m int mod = 1000000007; mod 1000000007 for(int i = 0;i < m;i++){
			a[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < m i m 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[] dp = new int[n+1]; dp new int[n+1] n+1 n 1 dp[0] = 1 dp[0] dp 0 1 for(int i = 0;i < m;i++){
			dp[a[i]] = -1;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			dp[a[i]] = -1;
		} {
			dp[a[i]] = -1;
		} dp[a[i]] = -1 dp[a[i]] dp a[i] a i -1 1 for(int i = 0;i <= n;i++){
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		} int i = 0; int i = 0; i 0 i <= n i n i++ i++ i {
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		} {
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		} if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			} dp[i] >= 0 dp[i] dp i 0 {
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			} if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				} i + 1 <= n && dp[i + 1] >= 0 i + 1 <= n i + 1 i 1 n dp[i + 1] >= 0 dp[i + 1] dp i + 1 i 1 0 {
					dp[i + 1] += dp[i]%mod;
				} dp[i + 1] += dp[i]%mod dp[i + 1] dp i + 1 i 1 dp[i]%mod dp[i] dp i mod if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				} i + 2 <= n && dp[i + 2] >= 0 i + 2 <= n i + 2 i 2 n dp[i + 2] >= 0 dp[i + 2] dp i + 2 i 2 0 {
					dp[i + 2] += dp[i]%mod;
				} dp[i + 2] += dp[i]%mod dp[i + 2] dp i + 2 i 2 dp[i]%mod dp[i] dp i mod System.out.print(dp[n]%mod) System.out.print System.out System System.out dp[n]%mod dp[n] dp n mod String[] args args static boolean checkswitch(int bit,int[] k,ArrayList<ArrayList<Integer>> list,int[] p,int m){

		//		System.out.println("bit " + bit);

		for(int i = 0;i < m;i++){

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		}


		return true;

	} checkswitch {

		//		System.out.println("bit " + bit);

		for(int i = 0;i < m;i++){

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		}


		return true;

	} for(int i = 0;i < m;i++){

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		} {

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		} ArrayList<Integer> sub = list.get(i); sub list.get(i) list.get list i int onnum = 0; onnum 0 for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			} int j = 0; int j = 0; j 0 j < sub.size() j sub.size() sub.size sub j++ j++ j {
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			} {
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			} if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				} (bit & (1 << sub.get(j))) != 0 (bit & (1 << sub.get(j))) bit (1 << sub.get(j)) 1 sub.get(j) sub.get sub j 0 {				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				} onnum++ onnum if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			} onnum % 2 != p[i] onnum % 2 onnum 2 p[i] p i {				//一個でも電球がつかなかったらout
				return false;
			} return false; false return true; true int bit bit int[] k k ArrayList<ArrayList<Integer>> list list int[] p p int m m static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	} gcd {				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	} if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		} b == 0 b 0 {
			return a;
		} return a; a {
			return gcd(b, a%b);
		} return gcd(b, a%b); gcd(b, a%b) gcd b a%b a b int a a int b b class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return  otherpair.end - end;
	}
} Pair int from; from int end; end @Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return  otherpair.end - end;
	} compareTo {
		Pair otherpair = (Pair)other;

		return  otherpair.end - end;
	} Pair otherpair = (Pair)other; otherpair (Pair)other return  otherpair.end - end; otherpair.end - end otherpair.end otherpair otherpair.end end Object other other Comparable
import java.util.ArrayList;
import java.util.Scanner;
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];
		int mod = 1000000007;
		for(int i = 0;i < m;i++){
			a[i] = sc.nextInt();
		}
		int[] dp = new int[n+1];
		dp[0] = 1;
		for(int i = 0;i < m;i++){
			dp[a[i]] = -1;
		}
		for(int i = 0;i <= n;i++){
			if(dp[i] >= 0){
				if(i + 1 <= n && dp[i + 1] >= 0){
					dp[i + 1] += dp[i]%mod;
				}
				if(i + 2 <= n && dp[i + 2] >= 0){
					dp[i + 2] += dp[i]%mod;
				}
			}
		}
		System.out.print(dp[n]%mod);




	}


	static boolean checkswitch(int bit,int[] k,ArrayList<ArrayList<Integer>> list,int[] p,int m){

		//		System.out.println("bit " + bit);

		for(int i = 0;i < m;i++){

			ArrayList<Integer> sub = list.get(i);
			int onnum = 0;						//onの数
			for(int j = 0;j < sub.size();j++){
				//				System.out.println("sub "+ sub.get(j));
				if((bit & (1 << sub.get(j))) != 0){				//目的のスイッチがついているか
					onnum++;
					//					System.out.println("on  ");
				}

			}
			if(onnum % 2 != p[i]){				//一個でも電球がつかなかったらout
				return false;
			}

		}


		return true;

	}

	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}





}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return  otherpair.end - end;
	}
}


