import sys
input = sys.stdin.readline
N,M = map(int,input().split())
lst=[int(input()) for i in range(M)]
t=0
ans=[0]*(N+1)
ans[0]=1
for j in range(N):
 if M!=0:
  if lst[t]==j+1:
   ans[j+1]=0
   t+=1
   t=min(M-1,t)
 else:
  ans[j+1]+=ans[j]
  if j!=0:
   ans[j+1]+=ans[j-1]
  ans[j+1]%=(10**9+7)
print(ans[N])