n, m = gets.split.map(&:to_i)
broken_stairs = []
dp = Array.new(n + 1, 0)
m.times do
  broken_stairs << gets.to_i
end
dp[0] = 1
dp[1] = 1
mod = 1000000007
(2..n).each do |i|
  next if dp[i] == -1
  dp[i] = (dp[i] + dp[i - 2]) % mod if dp[i - 2] != -1
  dp[i] = (dp[i] + dp[i - 1]) % mod if dp[i - 1] != -1
end

puts dp[n]