n,m=map(int,input().split())
a=[]
for i in range(m):
  a.append(int(input()))
b=[0 for x in range(n+1)]
b[0]=1
for i in range(n-1):
  if i not in a:
    b[i+1]+=b[i]
    b[i+2]+=b[i]
  else:
    b[i]=0

if n not in a:
  b[n]+=b[n-1]

print(b[n]%(10**9+7))
