n,m = parse.(split(readline()))
a = ones(Int,n+10)
f = zeros(Int,n+10)
for i in 1:m
  a[parse(readline())]=0
end
f[1]=1
for i in 1:(n+1)
  f[i]%=1000000007
  f[i+1]+=f[i]*a[i]
  f[i+2]+=f[i]*a[i+1]
end
println(f[n+1])
