N,M = map(int,input().split())
mod=10**9+7
A=[]
for i in range(M):
  A +=[int(input())]

B=[1]
if 1 in A:
  B +=[0]
else:
  B +=[1]
for i in range(2,N+1):
  if i in A:
    B +=[0]
  else:
    B +=[B[i-1]+B[i-2]]
print(B[-1]%mod)