in1=gets.chomp.split(" ").map(&:to_i)
n=in1[0]
m=in1[1]
step=[]
breaker=[]

for i in 0..n do
 step[i]=0
 breaker[i]=true
end
for i in 0...m do
 a=gets.to_i
 breaker[a]=false
end

step[0]=1

for i in 0...n do
 for j in 1..2 do
  if i+j<=n&&breaker[i]
   step[i+j]=step[i+j]+step[i]
  end
 end
end
puts step[n]%1000000007