fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(" ").map { it.toInt() }
    var ng = (1 .. m).map{ readLine()!!.toInt() }
    var dp = mutableListOf(0L)
    for (i in 1 .. n){
        if (ng.contains(i)){
            dp.add(0)
        }
        else if(i == 1){
            dp.add(1)
        }
        else if(i == 2){
            dp.add(dp.last() + 1)
        }
        else{
            dp.add(dp[i - 1] + dp[i - 2] % 1000000007)
        }
    }

    println(dp.last())
}