MOD=1000000007
n,m=map(int,input().split())
A=[1 for i in range(n)]
A[1]=2
for i in range(m):
  A[int(input())-1]=0
  


for i in range(2,n):
  if A[i]!=0:
    A[i]=(A[i-1]+A[i-2])%MOD
    
    
print(A[n-1])