n, m = gets.split.map(&:to_i)
a = Array.mew(m){gets.to_i}
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1
a.each do |x|
  dp[x] = -1
end
2.upto(n) do |i|
  next if dp[i] == -1
  dp[i] += [dp[i - 1], 0].max + [dp[i - 2], 0].max
  dp[i] %= 1_000_000_007
end
puts dp[n]