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

    val isSafeSteps = (0..n).map { true }.toMutableList().toTypedArray()
    aList.forEach { i: Int -> isSafeSteps[i] = false }

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

    for (i in 0..n) {
        if (isSafeSteps[i]) {
            if (i + 1 < n + 1) {
                sumList[i + 1] += sumList[i]
                sumList[i + 1] = sumList[i + 1] % 1000000007
            }
            if (i + 2 < n + 1) {
                sumList[i + 2] += sumList[i]
                sumList[i + 2] = sumList[i + 2] % 1000000007
            }
        }
    }

    println(sumList[n])
}
