[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let [n;m] = reads int
    let xs = List.init m (fun _ -> read int)
    let inf = 1000000007
    let ary = Array.create (n + 1) 0

    List.iter (fun x -> ary.[x] <- -1) xs
    ary.[0] <- 1
    if ary.[1] = -1 then
        ary.[1] <- 0
    else
        ary.[1] <- 1

    for i = 2 to n do
        if ary.[i] = -1 then
            ary.[i] <- 0
        else
            ary.[i] <- (ary.[i-2] + ary.[i-1]) % inf

    printfn "%A" ary.[n]
    0