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


    val dp = IntArray(n + 1) {0}

    dp[0] = 1
    dp[1] = 1

    for (i in 0 until m) {
        dp[readLine()!!.toInt()] = -1
    }

    var ans = 0
    val modVal = 1e9.toInt() + 7
    for (i in 2..n){

        if(dp[i] == -1) continue

        if(dp[i-1] == -1 && dp[i-2] == -1) {
            println(0)
            return
        }

        if(dp[i-1] != -1) {
            dp[i] = (dp[i] + dp[i-1]) % modVal
        }

        if(dp[i-2] != -1) {
            dp[i] = (dp[i] +  dp[i-2]) % modVal
        }
    }

    println(dp[n])
}