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