import java.util.*

fun main(args: Array<String>) {
  val (n, m) = listOfInt()
  val aSet = (0 until m).map {
    nextInt()
  }.toSet()

  val dp = mutableMapOf<Int, Int>()
  dp[0] = 1
  (1..n).forEach { i ->
    if (aSet.contains(i)) {
      dp[i] = 0
    } else {
      val preConbNum = dp[i - 1] ?: 0
      val pre2ConbNum = dp[i - 2] ?: 0
      dp[i] = (preConbNum + pre2ConbNum) % 1000000007
    }
  }
  println(dp[n])
}

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { it.toInt() }