fun main(args: Array<String>) {
    val (n,m)= readLine()!!.split(" ").map { it.toInt() }
    val dp = IntArray(n+2)
    dp[0] = 1
    val broken = (1..m).map { readLine()!!.toInt() }.toSet()

    (0..n-1).forEach { i ->
        dp[i+1] += if((i+1) in broken) 0 else dp[i]
        dp[i+2] += if((i+2) in broken) 0 else dp[i]
        dp[i+1] %= 1000000007
        dp[i+2] %= 1000000007
    }
    println(dp[n])
}