const main = (inputs) => {
  var mod = 1000000007;

  var N = inputs[0].split(" ")[0]-0;
  var M = inputs[0].split(" ")[1]-0;
  var ana = {};
  for(var i=1;i<=M;i++){
    ana[inputs[i]] = true;
    if(i>1 && inputs[i] - inputs[i-1] == 1) {console.log(0);return;}
  }
  var map = {
    0: 1,
    1: (ana[1]?0:1)
  };
  for(var i=2;i<=N;i++){
    if(ana[i]) continue;
    map[i] = (map[i-1]||0) + (map[i-2]||0);
    map[i] = map[i]%mod;
  }
  console.log(map[N]);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));
