var brokenStairs = mutableSetOf<Int>()
var memo = mutableMapOf<Int, Int>()
val modnum = 1000000007

fun main(args: Array<String>) {
    val (N, M) = readLine()!!.split(" ").map { it.toInt() }
    for (i in 0..M - 1) {
        brokenStairs.add(readLine()!!.toInt())
    }
    print(fibonacci(N))
}

fun fibonacci(n: Int): Int {
    if (memo.containsKey(n)) {
        return memo[n]!!
    }
    when (n) {
        0, 1 -> {
            if (brokenStairs.contains(n)) {
                memo[n] = 0
            } else {
                memo[n] = 1
            }
        }
        else -> {
            if (brokenStairs.contains(n)) {
                memo[n] = 0
                fibonacci(n - 1)
            } else {
                memo[n] = (fibonacci(n - 1) + fibonacci(n - 2)) % modnum
            }
        }
    }
    return memo[n]!!
}
