N, M = gets.split.map(&:to_i)

a = M.times.map {
    gets.to_i
}

dp = [0] * N
if a.include?(1)
  dp[1] = 0
  dp[2] = 1
end
if a.include?(2)
  dp[2] = 0
end

3.upto(N) do |i|
  next if a.include?(i)

  x = dp[i - 2]
  y = dp[i - 1]

  dp[i] = x + y
end

puts dp[N] % 1_000_000_007