let n, m = Scanf.scanf " %d %d" @@ fun a b -> a, b
let a_s = Array.init m @@ fun _ -> Scanf.scanf " %d" (+) 0
let dp = Array.make (n + 1) 0
let bs = Array.make (n + 1) false
let f i v = if not bs.(i) then dp.(i) <- v
let _ = Array.iter (fun a -> bs.(a) <- true) a_s;
  f 0 1; f 1 1;
  for i = 2 to n do f i @@ (dp.(i - 1) + dp.(i - 2)) mod 1000000007 done;
  Printf.printf "%d\n" @@ dp.(n)