mn = gets.rstrip.split
n = mn[0].to_i
m = mn[1].to_i
a = []
a = m.times.map{gets.to_i}


dp = {}
(0..m-1).each do |i|
  dp[a[i]] = -1
end
dp[n] = 0
if dp[n-1] == -1 
  dp[n-1] = 0
else
  dp[n-1] = 1
end

  if dp[n-2] == -1 
    dp[n-2] = 0
  else
    dp[n-2] = 2
  end

(0..n-3).reverse_each do |i|
  if dp[i] == -1
    dp[i] = 0
  else
    dp[i] = dp[i+1] + dp[i+2]
  end
end

puts dp[0]%1000000007
    
