function main()
  
  (N, M) = map(x -> parse(Int, x), split(readline()))
  
  a = zeros(Int, M)
  for i in 1:M
    a[i] = parse(Int, readline()) + 1
  end
    
  ans = zeros(Int, 2N)
  
  for i in 1:N+1
    if i == 1
      ans[i] = 1
    elseif i == 2
      ans[i] = in(i, a) ? 0 : 1
    elseif !in(i, a)
      ans[i] = ans[i-1] + ans[i-2]
      ans[i] %= 1000000007
    end
  end
  
  println(ans[N+1])
  
end

main()