let modulo = 1000000007
let (+@) a b = (a + b) mod modulo
let () =
  Scanf.scanf "%d %d" @@ fun n m ->
  let a = Array.init m (fun _ -> Scanf.scanf " %d" ((+) 0)) in
  let b = Array.make (n+1) 0 in
  a |> Array.iter (fun v -> b.(v) <- -1);
  b.(0) <- 1;
  for i = 1 to n do
    if b.(i) >= 0 then begin
      if i > 1 then b.(i) <- b.(i) +@ b.(i-2);
      b.(i) <- b.(i) +@ b.(i-1)
    end else b.(i) <- 0
  done;
  Printf.printf "%d\n" b.(n)
