fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val n = sc.nextInt()
    val m = sc.nextInt()
    val a = LongArray(n + 1)
    sc.asSequence().take(m).map(String::toInt).forEach { a[it] = -1L }

    if (a[0] != -1L) a[0] = 1L
    if (a[1] != -1L) a[1] = 1L

    for (i in 2..n) {
        if (a[i] == -1L) {

        } else if (a[i - 1] == -1L) {
            if (a[i - 2] == -1L) {
                println(0)
                return
            }
            a[i] = a[i - 2]
        } else if (a[i - 2] == -1L) {
            a[i] = a[i - 1]
        } else {
            a[i] = (a[i - 2] + a[i - 1])  % 1000000007
        }
    }

    if (a.last() == -1L) {
        println(0)
        return
    }

    println(a.last())
}
