n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
dp=[0]*(n+2)
num=10**9+7
dp[0]=1
for i in range(n):
    if i in a:
        dp[i]=0
    else:
        dp[i]=dp[i]%num
        if i<n:
            dp[i+1]+=dp[i]
            dp[i+2]+=dp[i]
print(dp[-2]%num)