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

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