N,M=map(int,input().split())
A=[int(input()) for i in range(M)]
m=10**9+7
b=0
ans=[0,1]
for i in range(1,N+1):
    if (i in A) and (i+1 in A):
        print(0)
        exit()
    if i in A:
        ans.append(0)
    else:
        ans.append(ans[-1]+ans[-2])

print(ans[-1] % m)