mod = 10**9+7
n,m = map(int,input().split())
lst = [int(input()) for _ in range(m)]
dp = [0]*(n+1)
for i in range(1,n+1):
    if i in lst:
        continue
    elif i==1:
        dp[i] = 1
    elif i==2:
        dp[i] = dp[1]+1
    else:
        dp[i] = (dp[i-1] + dp[i-2])%mod
print(dp[n])