n,m = map(int,input().split())
a = list(map(int,input().split()))
lis = [1] + [0]*n

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