parseInt(x) = parse(Int, x)
parseArray(x::Array{SubString{String}, 1}) = map(parseInt, x)

function main()
  N,M= readline() |> split |> parseArray
  a = zeros(Int, N)
  a[1] = 1
  a[2] = 2
  for _ in 1:M
    i = readline() |> parseInt
    a[i] = -1
  end

  a[2]!=-1 && a[1]==-1 && (a[2]=1)

  for i in 3:N
    a[i]==-1 && continue
    a[i-2] != -1 && (a[i]+=a[i-2])
    a[i-1] != -1 && (a[i]+=a[i-1])
  end

  println(a[N]%1_000_000_007)
end

main()
