import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.numeric;


void main()
{
  immutable mod = 1_000_000_007;
  int n, m;
  readf("%d %d\n", &n, &m);
  bool[int] a;
  auto b = new long[](n+3);
  foreach (i; 0..m) {
    auto x = readln.chomp.to!int;
    a[x] = true;
  }
  b[0] = 1;
  foreach (i; 0..n) {
    if (a.get(i, false)) {
      continue;
    }
    b[i+1] += b[i] % mod;
    b[i+2] += b[i] % mod;
  }

  writeln(b[n] % mod);
}
