n, m = map(int, input().split())
broken = []
for _ in range(m):
    a = int(input())
    broken.append(a)
    
dp = [0]*(n+2)
mod = 1000000007
dp[n] = 1

for i in range(n-1,-1 , -1):
    if i in broken:
        continue
    else:
        dp[i] = dp[i+1] + dp[i+2]
print(dp[0]%mod)
    