n, m = gets.split.map(&:to_i)

a = []
dp = []
dp[0] = 1

m.times do |i|
  a << gets.to_i
end

dp[1] = a.include?(1) ? 0 : 1 

for i in 2..n
  dp[i] = dp[i-1] + dp[i-2]
  dp[i] = 0 if a.include?(i)
end

puts dp[n] % 1000000007
