require 'set'
MOD = 10**9 + 7

N, M = gets.split.map(&:to_i)
dp = Array.new(N + 1) {0}
dp[0] = 1

broken = Set.new
M.times {broken << gets.to_i}

N.times do |i|
  if i + 1 <= N and not broken.include?(i + 1)
    dp[i + 1] += dp[i]
    dp[i + 1] %= MOD
  end
  if i + 2 <= N and not broken.include?(i + 2)
    dp[i + 2] += dp[i]
    dp[i + 2] %= MOD
  end
end

puts dp[N]