n,m=map(int,input().split())
a=[]
b=[0]*(n+1)
b[0]=0
b[1]=1

for i in range(0,m):
  a.append(int(input()))
  
for j in range(1,n+1):
  if j in a:
    b[j]=0
  else:
    if j==2:
      if b[1]==0:
        b[j]=0
      else:
        b[j]=2
    else:
      b[j]=b[j-1]+b[j-2]
    
print(b[n]%(10**9+7))    
    
  
  
  