MOD = 10 ** 9 + 7
N, M = map(int, input().split())
A = tuple(int(input()) for _ in range(M))
table = [0] * (N + 1)
table[0] = 1
for i in range(N + 1):
    now = table[i]
    if i + 1 < N + 1 and i + 1 not in A:
        table[i + 1] = (table[i + 1] + now) % MOD
    if i + 2 < N + 1 and i + 2 not in A:
        table[i + 2] = (table[i + 2] + now) % MOD
print(table[N])