N,M=map(int,input().split())
a=[int(input()) for _ in range(M)]

l=[0]*(N+1)
l[0]=1
# print(l)

for i in range(N):
    c=l[i]
    # print(c)
    if i not in a:
        if i+1 not in a:
            l[i+1]+=c
        if i<=N-2 and i+2 not in a:
            l[i+2]+=c

print(l[N]%1000000007)