function main(input) {
	input = input.trim().split("\n");
  	const [n, m] = input[0].split(" ").map(n => Number(n));
  	const a = input.slice(1).map(n => Number(n));
  	const memo = {};
  	const dp = (i) => {
      	if (memo[i] !== undefined) return memo[i];
      	if (a.indexOf(i) !== -1) return 0;
    	if (i === 1) return 1;
      	if (i === 2) {
        	if (a.indexOf(1) !== -1) return 1;
          	return 2;
        }
      	let ans = dp(i - 1) + dp(i - 2);
        while (1000000007 <= ans) {
    		ans %= 1000000007;
    	}
      	memo[i] = ans;
      	return ans;
    };
  	console.log(dp(n));
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
