n,m=map(int,input().split())
a=[]
dp=[0]*(n+1)
mo=10**9+7
for i in range(m):
    a.append(int(input()))

for i in range(n+1):
    if i==0:
        dp[i]=1
    elif i==1:
        if 1 not in a:
            dp[i]=1
    elif i not in a:
        dp[i]=dp[i-1]+dp[i-2]
        dp[i]%=mo
        

print(dp[n]%mo)