import java.util.Arrays;
import java.util.Scanner;
/**
 * 精進
 * @author linds_000
 *
 */
public class Main {

	public static void main(String[] args) {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	}

} Main public static void main(String[] args) {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	} main {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final long MOD = 1000000007L; MOD 1000000007L boolean[] step = new boolean[n + 1]; step new boolean[n + 1] n + 1 n 1 Arrays.fill(step, true) Arrays.fill Arrays step true for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			step[Integer.parseInt(sc.next())] = false;
		} {
			step[Integer.parseInt(sc.next())] = false;
		} step[Integer.parseInt(sc.next())] = false step[Integer.parseInt(sc.next())] step Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc false long[] ans = new long[n + 1]; ans new long[n + 1] n + 1 n 1 ans[0] = 1L ans[0] ans 0 1L for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		} int now = 0; int now = 0; now 0 now < n now n now++ now++ now {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		} {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		} for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			} int next = now + 1; int next = now + 1; next now + 1 now 1 next <= Integer.min(now + 2, n) next Integer.min(now + 2, n) Integer.min Integer now + 2 now 2 n next++ next++ next {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			} {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			} if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				} step[next] step next {
					ans[next] += ans[now];
					ans[next] %= MOD;
				} ans[next] += ans[now] ans[next] ans next ans[now] ans now ans[next] %= MOD ans[next] ans next MOD System.out.println(ans[n]) System.out.println System.out System System.out ans[n] ans n String[] args args public class Main {

	public static void main(String[] args) {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	}

} public class Main {

	public static void main(String[] args) {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	}

} Main
import java.util.Arrays;
import java.util.Scanner;
/**
 * 精進
 * @author linds_000
 *
 */
public class Main {

	public static void main(String[] args) {

		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		final long MOD = 1000000007L;
		boolean[] step = new boolean[n + 1];
		Arrays.fill(step, true);
		for (int i = 0; i < m; i++) {
			step[Integer.parseInt(sc.next())] = false;
		}

		long[] ans = new long[n + 1];

		ans[0] = 1L;
		for (int now = 0; now < n; now++) {
			for (int next = now + 1; next <= Integer.min(now + 2, n); next++) {
				if(step[next]) {
					ans[next] += ans[now];
					ans[next] %= MOD;
				}
			}
		}
		System.out.println(ans[n]);
	}

}
