r = 10 ** 9 + 7
N, M = map(int, input().split())
a = [input() for _ in range(M)]
dp = [0] * (N+1)

if str(1) in a:
    dp[1] = 0
else:
    dp[1] = 1

if str(2) in a:
    dp[2] = 0
else:
    dp[2] = dp[1] + 1

for i in range(1,N-1):
    if str(i+2) in a:
        dp[i+2] = 0
    else:
        dp[i+2] = (dp[i] + dp[i+1]) % r

print(dp[N])