let m = 1000000007
let ( +^ ) x y = (x + y) mod m

module IntSet = Set.Make (struct
  type t = int
  let compare = compare
end)

let () = Scanf.scanf "%d %d\n" @@ fun n m ->
  let as_ =
    IntSet.of_list @@
    Array.to_list @@
    Array.init m @@ fun _ ->
      Scanf.scanf "%d\n" @@ fun a -> a in
  let dp = Array.make (n + 1) 0 in
  dp.(0) <- 1;
  dp.(1) <- if IntSet.mem 1 as_ then 0 else 1;
  for i = 2 to n do
    dp.(i) <-
      if IntSet.mem i as_
      then 0
      else dp.(i - 1) +^ dp.(i - 2)
  done;
  Printf.printf "%d\n" @@ dp.(n)