import scala.io.StdIn._
object Main extends App {
  val MOD = 1000000007L
  val Array(n, m) = readLine.trim.split(' ').map(_.toInt)
  val broken = Array.fill(m){readLine.toInt}.toSet
  val memo = Array.fill(n + 2){0L}
  memo(n) = 1
  for (i ← (0 until n).reverse if !broken.contains(i)) {
    memo(i) = (memo(i + 1) + memo(i + 2)) % MOD
  }
  println(memo.head)
}
