n,m = map(int,input().split())
a =  [int(input()) for i in range(m)]

dp =[0]*(n+1)


for i in range(n+1):
    if i<=1:
        dp[i]=1
    else:
        dp[i] = (dp[i-2]+dp[i-1])
    if i in a:
        dp[i] = 0

print(dp[-1]%1000000007)