N, M = map(int, raw_input().split(' '))
P = 1000000007

skip = []
for i in range(M):
    skip.append(int(raw_input()))


steps = [0] * (N + 2)
steps[0] = 1

for i in range(0, N):
    if i+1 not in skip:
        steps[i+1] += steps[i]
        steps[i+1] %= P

    if i+2 not in skip:
        steps[i+2] += steps[i]
        steps[i+1] %= P

print steps[N]
