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