N,M=map(int,input().split())
A=[int(input()) for __ in range(M)]
ans=[0]*N

if 1 in A:
    ans[0]=0
    ans[1]=1
else:
    ans[0]=1
    ans[1]=2

for n in range(N):
    if n>1:
        if n+1 in A and n in A:
            print(0)
            break
        elif n+1 in A:
            ans[n]=0
        else:
            ans[n]=ans[n-1]+ans[n-2]
            ans[n] %= 1000000007
else:
    print(ans[N-1])
