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

