import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main { //atcoder ABC128C -

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java public class Main { //atcoder ABC128C -

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int n = Integer.parseInt(st.nextToken()); n Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int m = Integer.parseInt(st.nextToken()); m Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st boolean[] arr = new boolean[n+1]; arr new boolean[n+1] n+1 n 1 long[] count = new long[n+1]; count new long[n+1] n+1 n 1 for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		} {
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		} int a = Integer.parseInt(br.readLine()); a Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br arr[a] = true arr[a] arr a true count[0] = 1 count[0] count 0 1 count[1] = arr[1] ? 0 : 1 count[1] count 1 arr[1] ? 0 : 1 arr[1] arr 1 0 1 for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		} int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		} {
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		} if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			} !arr[i] arr[i] arr i {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			} count[i] = (count[i-1] + count[i-2]) % 1000000007 count[i] count i (count[i-1] + count[i-2]) % 1000000007 (count[i-1] + count[i-2]) count[i-1] count i-1 i 1 count[i-2] count i-2 i 2 1000000007 System.out.println(count[n]) System.out.println System.out System System.out count[n] count n String[] args args public class Main { //atcoder ABC128C -

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	}
} public class Main { //atcoder ABC128C -

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main { //atcoder ABC128C -

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		boolean[] arr = new boolean[n+1];
		long[] count = new long[n+1];
		for(int i = 0; i < m; i++){
			int a = Integer.parseInt(br.readLine());
			arr[a] = true;
		}
		count[0] = 1;
		count[1] = arr[1] ? 0 : 1;
		for(int i = 2; i <= n; i++){
			if(!arr[i]) {
				count[i] = (count[i-1] + count[i-2]) % 1000000007;
			}
		}
		System.out.println(count[n]);
	}
}
