let () =
    let main () =
        let n, m = Scanf.sscanf (read_line ()) "%d %d" (fun n m -> n, m) in
        let a = Array.init m (fun _ -> int_of_string (read_line ())) in
        let f = Array.make (n + 1) true in
        let () = Array.iter (fun v -> f.(v) <- false) a in
        let c = Array.make (n + 1) 0 in
        let () = c.(0) <- 1 in
        let mm = 1_000_000_007 in
        for i = 0 to n - 1 do
            if               f.(i + 1) then c.(i + 1) <- (c.(i + 1) + c.(i)) mod mm;
            if i + 2 <= n && f.(i + 2) then c.(i + 2) <- (c.(i + 2) + c.(i)) mod mm
        done;
        Printf.printf "%d\n" c.(n)
    in
    main ()