import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
 
public class Main {
	
	long[] Ni = null;
	
	
	public void solve() {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	}
	
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}
 
} import java.util.Arrays; Arrays java.util import java.util.LinkedList; LinkedList java.util import java.util.Scanner; Scanner java.util public class Main {
	
	long[] Ni = null;
	
	
	public void solve() {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	}
	
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}
 
} Main long[] Ni = null; Ni null public void solve() {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	} solve {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int M = in.nextInt(); M in.nextInt() in.nextInt in Ni = new long[N+1] Ni new long[N+1] N+1 N 1 Arrays.fill(Ni, -1) Arrays.fill Arrays Ni -1 1 Ni[N] = 1 Ni[N] Ni N 1 Ni[N-1] = 1 Ni[N-1] Ni N-1 N 1 1 for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			Ni[in.nextInt()] = 0;
		} {
			Ni[in.nextInt()] = 0;
		} Ni[in.nextInt()] = 0 Ni[in.nextInt()] Ni in.nextInt() in.nextInt in 0 in.close() in.close in for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		} int i=N-2; int i=N-2; i N-2 N 2 i>=0 i 0 i-- i-- i {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		} {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		} if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			} Ni[i] != 0 Ni[i] Ni i 0 {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			} Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007 Ni[i] Ni i (Ni[i+1] + Ni[i+2]) % 1000000007 (Ni[i+1] + Ni[i+2]) Ni[i+1] Ni i+1 i 1 Ni[i+2] Ni i+2 i 2 1000000007 System.out.println(Ni[0]) System.out.println System.out System System.out Ni[0] Ni 0 public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	} main {
		Main main = new Main();
		main.solve();
	} Main main = new Main(); main new Main() main.solve() main.solve main String[] args args public class Main {
	
	long[] Ni = null;
	
	
	public void solve() {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	}
	
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}
 
} public class Main {
	
	long[] Ni = null;
	
	
	public void solve() {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	}
	
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}
 
} Main
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
 
public class Main {
	
	long[] Ni = null;
	
	
	public void solve() {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int M = in.nextInt();
		Ni = new long[N+1];
		Arrays.fill(Ni, -1);
		Ni[N] = 1;
		Ni[N-1] = 1;
		
		for (int i=0; i<M; i++) {
			Ni[in.nextInt()] = 0;
		}
		in.close();
		
		
		for (int i=N-2; i>=0; i--) {
			if (Ni[i] != 0) {
				Ni[i] = (Ni[i+1] + Ni[i+2]) % 1000000007;
			}
		}
		
		System.out.println(Ni[0]);
	}
	
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}
 
}
