N, M = gets.split.map(&:to_i)
a = M.times.map { gets.to_i }.sort
ans_arr = [0] + [1] + Array.new
answered = false

(1..(a.size-1)).each do |i|
  if a[i] - a[i-1] == 1
    puts 0
    answered = true
    break
  end
end

unless answered
  (1..N).each do |i|
    if a.include?(i)
      ans_arr[i+1] = 0
    else
      ans_arr[i+1] = ans_arr[i-1] + ans_arr[i]
    end
  end
  puts ans_arr[N+1].modulo(1000000007)
end
