mod = 10**9+7
N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
k = [0]*(N+1)
k[0]=1
cnt = 0
if a[0]!=1:
    k[1]=1
else:
    cnt+=1
for i in range(2, N+1):
    if cnt<M and i ==a[cnt]:
        cnt+=1
        continue
    else:
        k[i]=k[i-1]+k[i-2]
print(k[N]%mod)
