n,m=[int(i) for i in input().split()]
a=[int(input()) for _ in range(m)]
dp=[1]+[0]*100010
for i in range(1,n+1):
    if i in a:
        dp[i]=0
    else:
        try:
            dp[i]=dp[i-1]+dp[i-2]
        except:
            dp[i]=dp[i-1]
        dp[i]%=1000000007
print(dp[n])