import queue
q=queue.Queue()
l=[]
n,m=map(int,input().split())
for i in range(m):
  p=int(input())
  q.put(p)
que=q.get()
for j in range(n+1):
  if j==0:
    l.append(1)
  elif j==1 and que!=1:
    l.append(1)
  elif j==que:
    l.append(0)
    que=q.get()
  else:
    l.append(l[j-2]+l[j-1])
print(l[n]%(10**9+7))