MOD = 10**9 + 7
n,m = gets.split.map(&:to_i)
dp = [1]*(n+1)
m.times do
  a = gets.to_i
  dp[a] = -1
end
dp[1] = 0 if dp[1] == -1
(n-1).times do |i|
  if dp[i+2] == -1
    dp[i+2] = 0
  else
    dp[i+2] = (dp[i+1] + dp[i]) % MOD
  end
end
p dp[n]
