import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

void main(){
  auto nm = readNums!int;
  int n = nm[0], m = nm[1];

  bool[] broken = new bool[](n);
  foreach(i; 0 .. m){
    broken[readNum!size_t - 1] = true;
  }

  ulong[] ans = new ulong[](n);
  if(!broken[0]) ans[0] = 1;
  if(!broken[1]) ans[1] = ans[0] + 1;
  foreach(i; 2 .. n){
    if(!broken[i]) ans[i] = (ans[i-1] + ans[i-2]) % 1_000_000_007;
  }

  writeln(ans[$-1]);
}
