N,M=map(int,input().split())
a=[int(input()) for i in range(M)]
dp=[1]*(N+2)
dp[1]=0 if a[0]==1 else 1
for i in a:
    dp[i]=0
for i in range(1,N):
    if dp[i+1]!=0:
        dp[i+1] = (dp[i]+dp[i-1]) % 1000000007
print(dp[N])