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

x=[0]*(N+1)
x[0]=1
x[1]=1 if not 1 in a else 0

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

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