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