n,m=parse.(split(readline()))
check=ones(n)
mod=1000000007
for i=1:m;check[parse(Int,readline())]=0;end
dp=zeros(n+3)
f(i::Int)=dp[i]*check[i]
dp[1]=check[1]*1
dp[2]=dp[1]+1
if n<3; print(dp[n]); return 0; end
for i=3:n
  dp[i]=(f(i-1)+f(i-2))%mod
end
print(Int(dp[n]))