import scala.io.StdIn

object Main {

  def main(args: Array[String]) = {

    val Array(n, m) = StdIn.readLine().split(' ').map(_.toInt)
    val as: Set[Int] = (1 to m).foldLeft(Set(): Set[Int])((s, _) =>
      s + StdIn.readLine().toInt
    )

    println(solve(n, as))

  }

  def solve(n: Int, as: Set[Int]): Int = {

    val r = 1000000007
    def local(i: Int, prepre: Int, pre: Int): Int = {
      val now: Int = if (as.contains(i)) {
        0
      } else {
        (prepre + pre) % r
      }
      if (i == n) {
        now
      } else {
        local(i + 1, pre, now)
      }
    }

    local(1, 0, 1)
  }

}
