n,m = map(int,input().split())
brokensteps = [int(input()) for x in range(m)]
dp = [0] * (n+1)
for i in range(n+1):
    if i in brokensteps:
        dp[i] = 0
        continue
    
    elif i <= 1:
        dp[i] = 1

    else:
        dp[i] = (dp[i-1]%(10**9+7) + dp[i-2]%(10**9+7))%(10**9+7)

print(dp[n])