N,M=(int(x) for x in input().split())
a=[int(input()) for i in range(M)]

x=[0 if i in a else 1 for i in range(N+1)]
for i in range(2,N+1):
    if x[i]!=0:
        x[i]=x[i-1]+x[i-2] 

print(x[N]%((10e+9)+7))