mod = 10**9+7
mod2 = mod * 5

n, m = gets.to_s.split
n, m = n.to_i, m.to_i

A = $<.map &:to_i

if A.each_cons(2).any?{|a, b| b - a == 1 }
  p 0
  exit
end

stairs = [1] * (n+1)

A.each do |a|
  stairs[a] = 0
end

2.upto(n) do |i|
  next if stairs[i] == 0
  stairs[i] = stairs[i-1] + stairs[i-2]
  stairs[i] %= mod if stairs[i] > mod2
end

puts stairs[-1] % mod