import scala.io.{StdIn => in}

object Main extends App {
  val mod = 1000000007L

  val Array(n, m) = in.readLine.split(" ").map(_.toInt)

  val isUsable = Array.fill(n+1)(true)
  Iterator.continually(in.readInt)
    .take(m)
    .foreach(isUsable(_) = false)

  val dp = Array.ofDim[Long](n+1)
  dp(0) = 1

  for {
    i <- 0 until n
    j <- i + 1 to (n min (i + 2))
    if isUsable(j)
  } {
    dp(j) += dp(i)
    dp(j) %= mod
  }

  val ans = dp(n)
  println(ans)
}