import sys
n,m=map(int,input().split())
a=[]
step=[0]*(n+1)
step[0]=1
for i in range(m):
  a.append(int(input()))
if 1 in a:
  step[1]=0
else:
  step[1]=1
for j in range(m-1):
  if a[j+1]-a[j]==1:
    print(0)
    sys.exit()

j=0
while j<n-1:
  if j+1 in a:
    step[j+2]=step[j]
    if (10**9)+7<=step[j+2]:
      step[j+2]=step[j+2]%((10**9)+7)
    j+=2
  else:
    if j+2 in a:
      step[j+3]=step[j]
      if (10**9)+7<=step[j+3]:
        step[j+3]=step[j+3]%((10**9)+7)
      j+=3
    else:
      step[j+2]=step[j]+step[j+1]
      if (10**9)+7<=step[j+2]:
        step[j+2]=step[j+2]%((10**9)+7)
      j+=2
print(step[n])  
  
