import kotlin.comparisons.*
import java.util.*

fun main(args: Array<String>) {
  val (n, m) = readLine()!!.split(' ').map(String::toInt)
  val a = BooleanArray(n)
  repeat(m) {
    a[readLine()!!.toInt() - 1] = true
  }
  val dp = IntArray(n + 1)
  dp[0] = 1
  for (i in 1..n) {
    if (a[i - 1]) continue
    dp[i] = dp[i - 1]
    if (i != 1) {
      dp[i] += dp[i - 2]
      dp[i] %= 1000000007
    }
  }
  println(dp[n])
}
