MOD = 1000000007

N, M = map(int, input().split())
alist = []
for _ in range(M):
    alist.append(int(input()))

if 1 in alist:
    dp = [[1, 0], [0, 1]]
else:
    dp = [[1, 1], [0, 1]]
for i in range(2, N+1):
    dp[0].append((dp[0][i-1] + dp[1][i-1]) % MOD)
    dp[1].append(dp[0][i-1])
    if i in alist:
        dp[0][-1] = 0

print(dp[0][N] % MOD)
