let n, m = Scanf.scanf " %d %d" @@ fun a b -> a, b
let a_s = Array.init m @@ fun _ -> Scanf.scanf " %d" @@ (+) 0
let memo = Array.make (n + 1) @@ -1
let rec f n =
  if memo.(n) <> -1 then memo.(n)
  else if n <= 1 then (memo.(n) <- 1; 1)
  else
    let f1 = f (n - 1) in
    let f2 = f (n - 2) in
    memo.(n) <- (f1 + f2) mod 1_000_000_007; 
    memo.(n)
let _ =
  Array.iter (fun a -> memo.(a) <- 0) a_s;
  f n |> Printf.printf "%d\n"