n,m = gets.split.map(&:to_i)
a = []
m.times { a << gets.to_i }
dp = [1,1]
broken = a.shift
if broken == 1
  broken = !a.empty? ? a.shift : nil
  dp[1] = 0
end
(2..n).each do |i|
  dp[i] = dp[i-1] + dp[i-2]
  if broken == i
    dp[i] = 0
    broken = !a.empty? ? a.shift : nil
  end
end
p dp[n] % 1000000007
