'use strict';
console.log(function(args){
  const tmp = args.trim().split('\n');
  const NM = tmp.shift().split(' ').map( v=>v|0 );
  const N = NM[0], M = NM[1];
  const a = tmp.map( v=>v|0 );
  const dp = Array(N+2).fill(0);
  dp[0] = 1;
  for ( let i = 0; i < N; i++ ) {
    if ( a.length && a[0] === i ) {
      a.shift();
      dp[i+2] = 0;
    } else {
      dp[i+1] = (dp[i+1] + dp[i]) % (1e9+7);
      dp[i+2] = (dp[i+2] + dp[i]) % (1e9+7);
    }
  }
  return dp[N].toString();
}(require('fs').readFileSync('/dev/stdin', 'utf8')));
