import java.io.*;
import java.util.*;
import java.util.function.*;

final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int M = Integer.parseInt(sc.get());
		BitSet A = new BitSet(N + 1);
		for (int i = 0; i < M; i++) {
			A.set(Integer.parseInt(sc.get()));
		}


		int[] table = new int[N + 1];
		table[0] = A.get(0) ? 0:1;
		table[1] = A.get(1) ? 0:1;
		for (int i = 2; i <= N; i++) {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		}
		System.out.println(table[N]);
	}
}

class Main {
	public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		});
	}
} Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		} StringTokenizer line; line public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			} get {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			} while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} line == null || !line.hasMoreTokens() line == null line null !line.hasMoreTokens() line.hasMoreTokens() line.hasMoreTokens line try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} IOException e {
					throw new UncheckedIOException(e);
				} throw new UncheckedIOException(e); new UncheckedIOException(e) {
					line = new StringTokenizer(reader.readLine());
				} line = new StringTokenizer(reader.readLine()) line new StringTokenizer(reader.readLine()) return line.nextToken(); line.nextToken() line.nextToken line import java.io.*; io.* java import java.util.*; util.* java import java.util.function.*; function.* java.util final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int M = Integer.parseInt(sc.get());
		BitSet A = new BitSet(N + 1);
		for (int i = 0; i < M; i++) {
			A.set(Integer.parseInt(sc.get()));
		}


		int[] table = new int[N + 1];
		table[0] = A.get(0) ? 0:1;
		table[1] = A.get(1) ? 0:1;
		for (int i = 2; i <= N; i++) {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		}
		System.out.println(table[N]);
	}
} Solver static final Solver INSTANCE = new Solver(); INSTANCE new Solver() void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int M = Integer.parseInt(sc.get());
		BitSet A = new BitSet(N + 1);
		for (int i = 0; i < M; i++) {
			A.set(Integer.parseInt(sc.get()));
		}


		int[] table = new int[N + 1];
		table[0] = A.get(0) ? 0:1;
		table[1] = A.get(1) ? 0:1;
		for (int i = 2; i <= N; i++) {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		}
		System.out.println(table[N]);
	} solve {
		int N = Integer.parseInt(sc.get());
		int M = Integer.parseInt(sc.get());
		BitSet A = new BitSet(N + 1);
		for (int i = 0; i < M; i++) {
			A.set(Integer.parseInt(sc.get()));
		}


		int[] table = new int[N + 1];
		table[0] = A.get(0) ? 0:1;
		table[1] = A.get(1) ? 0:1;
		for (int i = 2; i <= N; i++) {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		}
		System.out.println(table[N]);
	} int N = Integer.parseInt(sc.get()); N Integer.parseInt(sc.get()) Integer.parseInt Integer sc.get() sc.get sc int M = Integer.parseInt(sc.get()); M Integer.parseInt(sc.get()) Integer.parseInt Integer sc.get() sc.get sc BitSet A = new BitSet(N + 1); A new BitSet(N + 1) for (int i = 0; i < M; i++) {
			A.set(Integer.parseInt(sc.get()));
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			A.set(Integer.parseInt(sc.get()));
		} {
			A.set(Integer.parseInt(sc.get()));
		} A.set(Integer.parseInt(sc.get())) A.set A Integer.parseInt(sc.get()) Integer.parseInt Integer sc.get() sc.get sc int[] table = new int[N + 1]; table new int[N + 1] N + 1 N 1 table[0] = A.get(0) ? 0:1 table[0] table 0 A.get(0) ? 0:1 A.get(0) A.get A 0 0 1 table[1] = A.get(1) ? 0:1 table[1] table 1 A.get(1) ? 0:1 A.get(1) A.get A 1 0 1 for (int i = 2; i <= N; i++) {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		} int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		} {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		} if (A.get(i)) continue; A.get(i) A.get A i continue; table[i] = (table[i - 1]  + table[i - 2]) % 1000000007 table[i] table i (table[i - 1]  + table[i - 2]) % 1000000007 (table[i - 1]  + table[i - 2]) table[i - 1] table i - 1 i 1 table[i - 2] table i - 2 i 2 1000000007 System.out.println(table[N]) System.out.println System.out System System.out table[N] table N Supplier<String> sc sc class Main {
	public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		});
	}
} Main public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		});
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		});
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		}) Solver.INSTANCE.solve Solver.INSTANCE Solver Solver.INSTANCE new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		} String... args args
import java.io.*;
import java.util.*;
import java.util.function.*;

final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Supplier<String> sc) {
		int N = Integer.parseInt(sc.get());
		int M = Integer.parseInt(sc.get());
		BitSet A = new BitSet(N + 1);
		for (int i = 0; i < M; i++) {
			A.set(Integer.parseInt(sc.get()));
		}


		int[] table = new int[N + 1];
		table[0] = A.get(0) ? 0:1;
		table[1] = A.get(1) ? 0:1;
		for (int i = 2; i <= N; i++) {
			if (A.get(i)) continue;
			table[i] = (table[i - 1]  + table[i - 2]) % 1000000007;
		}
		System.out.println(table[N]);
	}
}

class Main {
	public static void main(String... args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		Solver.INSTANCE.solve(new Supplier<String>() {
			StringTokenizer line;

			public String get() {
				while (line == null || !line.hasMoreTokens()) try {
					line = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
				return line.nextToken();
			}
		});
	}
}