require 'set'
N, M = gets.split.map(&:to_i)
a_set = Set.new(M.times.map { gets.to_i })
MOD = 10 ** 9 + 7

dp = Array.new(N + 10) { 0 }
dp[0] = 1
(0..(N - 1)).each do |i|
  next if a_set.include?(i)
  unless a_set.include?(i + 1)
    dp[i + 1] = (dp[i + 1] + dp[i]) % MOD
  end
  unless a_set.include?(i + 2)
    dp[i + 2] = (dp[i + 2] + dp[i]) % MOD
  end
end
puts dp[N]
