n,m=map(int,input().split())
a=[]
for i in range(m):
  a.append(int(input()))
d=[1]*(n+1)
if 1 in a:
  d[1]=0

for i in range(n-1):
  if (i+2) in a:
    d[i+2]=0
  else:
    d[i+2]=(d[i]+d[i+1])%1000000007

print(d[n])
