N,M=map(int,input().split())
A=[int(input()) for i in range(M)]
l=0
r=1
ans=0
for i in range(1,N+1):
    if i in A:
        ans=0
        l=r
        r=ans
    else:
        ans=l+r
        l=r
        r=ans
print(ans%(10**9+7))