N,M = map(int, input().split())

a = [int(input()) for i in range(M)]

#初期化
dp=[-1]*N
dp[0]=1

for i in a:
    dp[i-1] = 0

dp[1]=dp[0]+1
for i in range(2,N):
    if dp[i]==0:
        continue
    else:
        dp[i]=dp[i-1]+dp[i-2]

print(dp[N-1]%1000000007)