mod = 10**9+7

n, m = gets.to_s.split.map{|t|t.to_i}
a = Array.new(m){ gets.to_s.to_i }

if n == 1
  puts 1
  exit
end

stairs = Array.new(n+1){ 0 }
stairs[0] = stairs[1] = 1

a.each do |k|
  stairs[k] = -1
end

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

puts (stairs[-1] % mod)