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