MOD=10**9+7
N,M=gets.split.map(&:to_i)
A=M.times.map{gets.to_i}

broken = Hash.new(false)
A.each do |aa|
    broken[aa] = true
end

dp=Array.new(N+1,0)
dp[0]=1
(0..N-1).each do |i|
    next if broken[i]
    (i+1..i+2).each do |ni|
        next if ni > N || broken[ni]
        dp[ni] = (dp[ni] + dp[i]) % MOD
    end
end
p dp[N]
