

function Main(input) {
  input = input.split("\n");
  var N = parseInt(input[0].split(" ")[0]);
  var M = parseInt(input[0].split(" ")[1]);
  input.shift();
  var a = input.map(i => parseInt(i));
  var dp = new Array(N+1).fill(0);
  for(var i=0;i<M;i++){
    dp[a[i]]=-1;
  }
  if(dp[1]!=-1){
    dp[1]=1;
  }
  dp[0]=1;
  var mod = Math.pow(10,9)+7;
  for(var i=2;i<N+1;i++){
    if(dp[i]!=-1){
    dp[i]=(Math.max(0,dp[i-2])+Math.max(0,dp[i-1]))%mod;
    }
  }
  var ans=dp[N];
  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));