N,M=map(int,input().split())
A=[int(input()) for _ in range(M)]
n1,n2=0,1
for i in range(1,N+1):
    if i in A:
        n1=n2
        n2=0
    else:
        tmp=n2
        n2=(n1+n2)%1000000007
        n1=tmp
print(n2)