import java.util.Scanner;
public 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];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
}

 import java.util.Scanner; Scanner java.util public 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];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
} 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];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	} main {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		int []a = new int [m];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[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 int []a = new int [m]; a new int [m] m boolean []jdg = new boolean [n+1]; jdg new boolean [n+1] n+1 n 1 long []Dp = new long [n+1]; Dp new long [n+1] n+1 n 1 int p = 1000000007; p 1000000007 for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		} {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc jdg [a[i]] = true jdg [a[i]] jdg a[i] a i true Dp[0] = 1 Dp[0] Dp 0 1 for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		} int i = 1 ; int i = 1 ; i 1 i <= n i n i++ i++ i {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		} {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		} if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		} jdg[i] == false jdg[i] jdg i false {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		} if(i == 1)
				Dp[i] = Dp[i -1]; i == 1 i 1 Dp[i] = Dp[i -1] Dp[i] Dp i Dp[i -1] Dp i -1 i 1 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			} i >= 2 i 2 {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			} Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p Dp[i] Dp i (Dp[i-1])%p+(Dp[i-2])%p (Dp[i-1])%p (Dp[i-1]) Dp i-1 i 1 p (Dp[i-2])%p (Dp[i-2]) Dp i-2 i 2 p Dp[i] = Dp[i]%p Dp[i] Dp i Dp[i]%p Dp[i] Dp i p if(jdg[i] == true) {
				Dp[i] = 0;
			} jdg[i] == true jdg[i] jdg i true {
				Dp[i] = 0;
			} Dp[i] = 0 Dp[i] Dp i 0 System.out.println(Dp[n]) System.out.println System.out System System.out Dp[n] Dp n String[] args args public 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];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
} public 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];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
} Main
import java.util.Scanner;
public 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];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
}


