fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(" ").map { it.toInt() }
    val aList = (1..m).map { readLine()!!.toInt() }

    val isSafeSteps = mutableMapOf(Pair(0, true))
    isSafeSteps.putAll((1..n).associateWith { i -> !aList.contains(i) })

    val sumList = MutableList(n + 1) { 0.toLong() }
    sumList[0] = 1

    for ((i, isSafeStep) in isSafeSteps) {
        val isNextSafe = isSafeSteps[i + 1]
        val isAfterNextSafe = isSafeSteps[i + 2]

        // すすめるパターンがあるケース
        if (isSafeStep) {
            if (i + 1 < n + 1) sumList[i + 1] += (sumList[i] % 1000000007)
            if (i + 2 < n + 1) sumList[i + 2] += (sumList[i] % 1000000007)
        } else if (isNextSafe == false || isAfterNextSafe == false) {
            // 詰みケースは0でfast returnさせる
            println(0)
            return
        }
    }

    println(sumList[n] % 1000000007)
}
