import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val m = sc.nextInt()
    val a = (0 until m).map { 
        sc.nextInt()
     }

     abc129c(n, a)
}

fun abc129c(n: Int, a: List<Int>) {
    val safe = BooleanArray(n + 1) { true }
    for (ai in a) {
        safe[ai] = false
    }
    val dp = LongArray(n + 1) { 0 }
    dp[0] = 1
    if (safe[1]) {
        dp[1] = 1
    }
    for (i in 1 until n) {
        if (!safe[i + 1]) {
            continue
        }

        dp[i + 1] = dp[i] + dp[i - 1] 
    } 
    val MOD = 1000000007
    println(dp[n] % MOD)
}
