n, m = list(map(int, input().split()))

MOD = pow(10, 9) + 7

dp = [0] * (n+1)

dp[0] = 1

broken = int(input())
c = 1

for i in range(1, n+1):
    if i == broken:
        dp[i] = 0
        if c < m:
            broken = int(input())
            c += 1
    else:
        if i == 1:
            dp[i] = dp[i-1] % MOD
        else:
            dp[i] = (dp[i-1] + dp[i-2]) % MOD

print(dp[n] % MOD) 
