N,M=map(int,input().split())
broken=[]
for i in range(M):
  broken.append(int(input()))
def dp(n):
  lst=[None]*(n+1)
  if len(lst)==1:
    lst[0]=1
  else:
    if 1 not in broken:
      lst[0],lst[1]=1,1
    else:
      lst[0],lst[1]=1,0
  if n<=1:
    return lst[n]
  else:
    for i in range(2,n+1):
      if i not in broken:
        lst[i]=lst[i-1]+lst[i-2]
      else:
        lst[i]=0
    return lst[n]
print(dp(N)%(10**9+7))