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]);
	}

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz