n,m=map(int,input().split())
a=[]
mod=10**9+7
for i in range(m):
  b=int(input())
  a.append(b)
block=[0,1]
for i in range(1,n+1):
  if i in a:
    block=block[1:]+[0]
  else:
    block=block[1:]+[sum(block)%mod]
print(block[-1])
