n, m = map(int, input().split())
A = []
for i in range(m):
    A.append(int(input()))
    
dp = [0 for i in range(n + 1)]
dp[0] = 1

for i in range(n+1):
    if not i in A:
        if (dp[i-2] >= 1) and (i-2 >= 0):
            dp[i] += dp[i-2]
        if (dp[i-1] >= 1) and (i-1 >= 0):
            dp[i] += dp[i-1]
            
print(dp[-1] % (10 ** 9 + 7))