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 dp = [];
  	dp[1] = a.indexOf(1) !== -1 ? 0 : 1;
  	if (a.indexOf(2) !== -1) {
      	dp[2] = 0;
    } else {
      	dp[2] = a.indexOf(1) !== -1 ? 1 : 2;
    }
  	for (let i = 3; i <= n; i++) {
      	if (a.indexOf(i) !== -1) {
        	dp[i] = 0;
          	continue;
        }
      	const ans = dp[i - 1] + dp[i - 2];
      	while (1000000007 <= ans) {
    		ans %= 1000000007;
    	}
      	dp[i] = ans;
    }
  	console.log(dp[n]);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
