n, m = gets.chomp.split(' ').map(&:to_i)
strs = m.times.map{ gets.to_i }
dp = Array.new(n, 0)
dp[-1] = 1
dp[-2] = 1
[*0..(n-3)].reverse_each do |str|
  if strs.include?(str+1)
    dp[str] = 0
    next
  end
  dp[str] = dp[str+1] + dp[str+2]
end
print (dp[0..1].inject(:+)) % (10**9+7)