N,M = gets.split.map(&:to_i)
A = readlines.map(&:to_i)
MOD = 1000000007 

dp = []
dp[N] = dp[N-1] = 1
A.each {|i| dp[i] = 0 }

(N-2).downto(0) do |i|
  dp[i] = (dp[i+1] + dp[i+2]) % MOD unless dp[i]
end
puts dp[0]
