N, M = map(int, input().split())
bs = [int(input()) for _ in range(M)]
bi = 0
pattern = [-1] * N

if bi < M and 1 == bs[bi]:
    pattern[0] = 0
    bi += 1
else:
    pattern[0] = 1

if bi < M and 2 == bs[bi]:
    pattern[1] = 0
    bi += 1
else:
    pattern[1] = 1 + pattern[0]

for i in range(2, N):
    if bi < M and (i + 1) == bs[bi]:
        pattern[i] = 0
        bi += 1
    else:
        pattern[i] = pattern[i -1] + pattern[i - 2]

print(pattern[-1] % 1000000007)
