n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
dp=[-1 for _ in range(n+1)]
dp[0]=dp[1]=1
def step(s):
    if s in a:
        dp[s]=0
        return
    elif dp[s]>=0:
        return 
    else:
        dp[s]=(dp[s-1]+dp[s-2])%1000000007
        return
for i in range(n+1):
    step(i)
print(dp[-1])