N, M = gets.split.map(&:to_i)
broken = []
M.times do |i|
    broken[gets.to_i] = true
end
dp = Array.new(N+3, 0)
dp[0] = 1
MOD = 10**9+7
(1..N).each do |i|
    dp[i] = (dp[i-1] + dp[i-2]) % MOD unless broken[i]
end
puts dp[N]