MOD=10**9+7

N,M=gets.split.map &:to_i
a=Array.new(N+2)
M.times{a[gets.to_i]=true}

dp=Array.new(N+2){0}
dp[0]=1
N.times do |i|
  dp[i+1]+=dp[i] unless a[i+1]
  dp[i+2]+=dp[i] unless a[i+2]
  dp[i+1] %= MOD
  dp[i+2] %= MOD
end
p dp[N]