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).associate { i -> Pair(i, !aList.contains(i)) })

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

    for ((i, isSafeStep) in isSafeSteps) {
        if (isSafeStep) {
            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])
}
