fun main(args: Array<String>) {
    val (N, M) = readLine()!!.split(" ").map { it.toInt() }
    val modnum = 1000000007
    var brokenStairs = mutableSetOf<Int>()
    var memo = mutableMapOf<Int, Int>()
    for (i in 1..M) {
        brokenStairs.add(readLine()!!.toInt())
    }
    print(fibonacci(N, memo, brokenStairs, modnum))
}

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