import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;
 
public class Main {
 
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset import java.util.*; util.* java public class Main {
 
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	}
} Main public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	} main {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	} InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); reader new InputStreamReader(System.in, StandardCharsets.UTF_8) BufferedReader in = new BufferedReader(reader); in new BufferedReader(reader) long MOD = 1000000007L; MOD 1000000007L String[] tokens = in.readLine().split(" "); tokens in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int N = Integer.parseInt(tokens[0]); N Integer.parseInt(tokens[0]) Integer.parseInt Integer tokens[0] tokens 0 int M = Integer.parseInt(tokens[1]); M Integer.parseInt(tokens[1]) Integer.parseInt Integer tokens[1] tokens 1 boolean[] statuses = new boolean[N + 1]; statuses new boolean[N + 1] N + 1 N 1 Arrays.fill(statuses, true) Arrays.fill Arrays statuses true for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		} int i = 0; int i = 0; i 0 i < M i M ++i ++i i {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		} {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		} int index = Integer.parseInt(in.readLine()); index Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in statuses[index] = false statuses[index] statuses index false long[] counts = new long[N + 1]; counts new long[N + 1] N + 1 N 1 Arrays.fill(counts, 0) Arrays.fill Arrays counts 0 counts[0] = 1 counts[0] counts 0 1 if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		} statuses[1] statuses 1 {
			counts[1] = 1;
		} counts[1] = 1 counts[1] counts 1 1 {
			counts[1] = 0;
		} counts[1] = 0 counts[1] counts 1 0 for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		} int i = 2; int i = 2; i 2 i <= N i N ++i ++i i {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		} {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		} if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			} statuses[i] statuses i {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} counts[i] = (counts[i - 2] + counts[i - 1]) % MOD counts[i] counts i (counts[i - 2] + counts[i - 1]) % MOD (counts[i - 2] + counts[i - 1]) counts[i - 2] counts i - 2 i 2 counts[i - 1] counts i - 1 i 1 MOD {
				counts[i] = 0;
			} counts[i] = 0 counts[i] counts i 0 System.out.println(counts[N]) System.out.println System.out System System.out counts[N] counts N String[] args args public class Main {
 
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;
 
public class Main {
 
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		long MOD = 1000000007L;
 
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int M = Integer.parseInt(tokens[1]);
 
		boolean[] statuses = new boolean[N + 1];
		Arrays.fill(statuses, true);
 
		for (int i = 0; i < M; ++i) {
			int index = Integer.parseInt(in.readLine());
			statuses[index] = false;
		}
 
		long[] counts = new long[N + 1];
		Arrays.fill(counts, 0);
		counts[0] = 1;
		if (statuses[1]) {
			counts[1] = 1;
		} else {
			counts[1] = 0;
		}
 
		for (int i = 2; i <= N; ++i) {
			if (statuses[i]) {
				counts[i] = (counts[i - 2] + counts[i - 1]) % MOD;
			} else {
				counts[i] = 0;
			}
		}
		System.out.println(counts[N]);
	}
}