n,m=map(int,input().split())
L=[int(input()) for i in range(m)]

NL=[0]*(n+1)
NL[0],NL[1]=1,1

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