(n,m)=gets.split.map(&:to_i)
a=ARGF.map {|s|s.to_i}


tmp=[0]*(n+1)
tmp[0]=1 if !a.include?(0)
tmp[1]=1 if !a.include?(1)
(2..n).each{|i|
    tmp[i] = tmp[i-1] + tmp [i-2] if !a.include?(i)
}

print tmp[n]%1000000007
