val MOD = 1000000007L

fun main(args:Array<String>){
  var (n,m) = readLine()!!.split(" ").map(String::toInt)
  val a = BooleanArray(n+10){false}
  for(i in 0..m-1){
    a[readLine()!!.toInt()] = true
  }
  var dp = LongArray(n+10){0}
  dp[0] = 1
  for(i in 1..n+1){
    if(a[i]){
      dp[i] = 0
    }else{
      if(i<2){
        dp[i] = dp[i-1]
        continue
      }
      dp[i] = dp[i-1]+dp[i-2]
      dp[i] %= MOD
    }
  }
  println(dp[n])
}