MOD=10**9+7
N,M=map(int,input().split())
a=[]

for i in range(M):
  a.append(int(input()))
s=[1]
b=0 if 1 in a else 1
s.append(b)
p,q=-1,-1
j=-1
for i in range(2,N+1):
  while j<M-1:
    if a[j+1]<=i:
      j+=1
    else:
      break
  v=s[i-2]+s[i-1]
  if a[j]==i:
    v=0
  s.append(v%MOD)
print(s[N])