n, m = gets.split.map(&:to_i)

as = m.times.map { gets.to_i }

ans = Array.new(n + 1, 0)
mod = 10 ** 9 + 7

ans[0] = 1
ans[1] = 1 unless as.include?(0)

2.upto(n) do |i|
  ans[i] += ans[i - 1] unless as.include?(i - 1)
  ans[i] += ans[i - 2] unless as.include?(i - 2)
  ans[i] %= mod
end

puts ans[n]
