n,m=map(int,input().split())
dp=[1]*n
cor=[1]*n
for i in range(m):
    cor[int(input())]=0
if cor[0]==0:
    dp[0]=0
if cor[1]==0:
    dp[1]=0
for i in range(2,n):
    dp[i]=(dp[i-1]+dp[i-2])%1000000007
    if cor[i]==0:
        dp[i]=0
print((dp[n-1]+dp[n-2])%1000000007)
#print(dp)