'use strict';(function(input){
  input=input.trim().split(/\s+/).map(x=>x-0);
  const N=input.shift(),
        M=input.shift(),
        K=10e9+7;
  input.unshift(0);
  input.push(N+1);
  const dp=new Array(N+2).fill(0);//dp[i]でi段目に至る場合の数mod.K
  dp[0]=1,dp[-1]=0;
  for(let counter=0;counter<=M;counter++){
    for(let i=input[counter]+1;i<input[counter+1];i++){
      dp[i]=(dp[i-2]+dp[i-1])%K;
    }
  }
  console.log(dp[N]);
})(require('fs').readFileSync('/dev/stdin','utf8'));
