function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	//input = input.trim().split(" ");
	input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var N = parseInt(input[0].split(" ")[0]);
  var M = parseInt(input[0].split(" ")[1]);
  input.shift();
  var ngList = input.map((a)=>Number(a));
  var list = new Array(N+1);
  list[N] = 1;
  for(var i = N - 1; i >= 0; i--){
    if(i == N - 1){
       if(ngList.indexOf(i) != -1){
          list[i] = 0;
       }else{
         list[i] = 1;
       }
    }else{
      if(ngList.indexOf(i) != -1){
          list[i] = 0;
       }else{
          var mae = list[i+2];
      		var ato = list[i+1];
         if(mae != 0 || ato != 0){
         	list[i] = (mae + ato) % 1000000007;
       		}else{
             myout("0");
              return;
            }
       }
    }
  }
  myout(list[0]);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
