object Main extends App {
  val Array(n,m) = readLine.split(" ").map{_.toInt}
  val a = (1 to m).map{_ => readInt}
  
  val dp = Array.fill[Int](n+1)(Int.MaxValue)
  dp(0) = 1
  dp(1) = 1
  
  a.foreach{v => dp(v) = 0}
  
  for(i <- 2 to n) {
    if(dp(i) != 0) dp(i) = (dp(i-2) + dp(i-1))%1000000007 
  }
  
  println(dp(n))
}