n,m=map(int,input().split())
A=[int(input()) for _ in range(m)]
L=[0]*(n+1)
L[0]=1
if 1 in A:L[1]=0
for i in range(2,n+1):
    if i in A:
        L[i]=0
    else:
        L[i]=L[i-2]+L[i-1]
print(L[n]%(10**9 + 7))