function Main(input){
  var N = input.split("\n")[0].split(" ")[0];
  N = parseInt(N,10);
  var M = input.split("\n")[0].split(" ")[1];
  M =parseInt(M,10);
  var a =input.split("\n");
  a.shift();
  var dp = [];
  dp[0] = 1;
  dp[1] = 1;
  for(i=0;i<=(M-1);i++){
    dp[a[i]]= 0;
  }
  for(i=2;i<=N;i++){
    if(dp[i]!==0){
      dp[i] = dp[i-1] + dp[i-2];
    }else{
      continue;
    }
  }
  var ans = dp[N]%1000000007;
  console.log(ans);
}     
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
