N,M=map(int,input().split())
A=[int(input()) for i in range(M)]
if 1 in A:
    B=[1]+[0]*N
else:
    B=[1]+[1]+[0]*(N-1)
for i in range(2,N+1):
    if i not in A:
        B[i]=(B[i-1]+B[i-2])%(10**9+7)
print(B[-1])