MOD = 1000000007
n, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
dp = [-1 for _ in range(n+1)]
dp[0] = 1
dp[1] = 1
if 1 in A:
    dp[1] = 0

step = 2
while True:
    if step == n+1:
        break
    
    if step in A:
        dp[step] = 0
    else:
        dp[step] = (dp[step-1] + dp[step-2]) % MOD
        
    step += 1
    
print(dp[n])