n,m=map(int,input().split())
a=[]
for i in range(m):
    A=int(input())
    a.append(A)
b=[0,1]
ans=1
for i in range(1,n+1):
    if i in a:
        b.append(0)
    else:
        b.append(b[i]+b[i-1])
    b[i]=b[i]%1000000007
    print(b)
print(b[len(b)-1]%1000000007)