fun main(args:Array<String>){
    val mod = 1000000007
    val line1 = readLine()!!.split(" ").map { it.toInt() }
    //nは最上段の数,mは壊れている床の数
    val n = line1[0]
    val m = line1[1]
    val list= mutableListOf<Int>()
    for(i in 1..m){
        list.add(readLine()!!.toInt())
    }
    //pnはn段目にたどり着く場合の数,pn1はn-1段目にたどり着く場合の数
    var pn1 = if(list.contains(1)) 0L else 1L
    var pn = if(list.contains(2)) 0L else pn1+1L
    for(i in 3..n){
        val pnext = if(list.contains(i)) 0L else pn+pn1
        pn1 = pn % mod
        pn = pnext % mod
    }
    println(pn)
}
