/* imports all std modules {{{*/
import
  std.algorithm,
  std.array,
  std.ascii,
  std.base64,
  std.bigint,
  std.bitmanip,
  std.compiler,
  std.complex,
  std.concurrency,
  std.container,
  std.conv,
  std.csv,
  std.datetime,
  std.demangle,
  std.encoding,
  std.exception,
  std.file,
  std.format,
  std.functional,
  std.getopt,
  std.json,
  std.math,
  std.mathspecial,
  std.meta,
  std.mmfile,
  std.net.curl,
  std.net.isemail,
  std.numeric,
  std.parallelism,
  std.path,
  std.process,
  std.random,
  std.range,
  std.regex,
  std.signals,
  std.socket,
  std.stdint,
  std.stdio,
  std.string,
  std.system,
  std.traits,
  std.typecons,
  std.uni,
  std.uri,
  std.utf,
  std.uuid,
  std.variant,
  std.zip,
  std.zlib;
/*}}}*/

/+---test
6 1
3
---+/
/+---test
10 2
4
5
---+/
/+---test
100 5
1
23
45
67
89
---+/

enum MOD = 1000000007;

void main(string[] args) {
  long N, M;
  readf(" %d %d ", &N, &M);

  auto A = new bool[](N);
  foreach (i; 0..M) {
    const a = readln.chomp.to!long;
    A[a] = true;
  }

  auto dp = new long[N+1];
  dp[0..2] = 1;
  foreach (i; 2..N+1) {
    if (!A[i-1]) dp[i] = (dp[i] + dp[i-1])%MOD;
    if (!A[i-2]) dp[i] = (dp[i] + dp[i-2])%MOD;
  }
  dp[$-1].writeln;
}
