fun main(args: Array<String>) {
    val mod = 1000000007
    val (n, m) = readInputLine().split(" ").map{it.toInt()}
    
    val dp = IntArray(n + 1)
    dp[0] = 1
    
    val aSet = mutableSetOf<Int>()
    
    for (i in 1..m) {
        aSet.add(readInputLine().toInt())
    }
    if (!aSet.contains(1)) {
        dp[1] = 1
    }
    
    for (i in 2..n) {
        if (aSet.contains(i)) {
            continue
        }
        
        dp[i] = dp[i - 2]
        dp[i] += dp[i - 1]
        dp[i] %= mod
    }

    println(dp[n])
}

fun readInputLine(): String {
    return readLine()!!
}
