module abc129.abc129_c;

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


void main() {
  const MOD = 1000000007;
  auto nm = readln.chomp.split.to!(int[]);
  auto a = make!(RedBlackTree!int);
  iota(nm[1]).each!(line => a.insert(readln.chomp.to!int));
  
  int[int] dp = [
    0: 1,
    1: 1 in a ? 0 : 1,
  ];

  foreach (int k; 2..(nm[0] + 1))
    dp[k] = (k in a ? 0 : (dp[k - 1] + dp[k - 2])) % MOD;
  
  writeln(dp[nm[0]]);
}
