Uses math;
var n, m, i, a : int64;
    dp : array[1..100010] of int64;
const remainder = 1000000007;
begin
  for i := 1 to 100010 do dp[i] := 0;
  dp[0] := 1;
  readln(n, m);
  for i := 1 to m do begin
    read(a);
    dp[a] := -1;
  end;
  
  for i := 0 to 100005 do begin
    if dp[i] = -1 then Continue;
    if dp[i+1] <> -1 then dp[i+1] := (dp[i+1] + dp[i]) mod remainder;
    if dp[i+2] <> -1 then dp[i+2] := (dp[i+2] + dp[i]) mod remainder;
  end;
  writeln(dp[n]);
end.