n,m=map(int,input().split())
mod=10**9+7
t=[int(input()) for i in range(m)] 
dp=[-1]*(n+1)

dp[0]=0
dp[1]=1
for i in range(m):
    dp[t[i]-1]=0


for i in range(3,n):
    if dp[i]!=0:
        dp[i]=dp[i-1]+dp[i-2]
print(dp[-2])
