from sys import exit

N, M = map(int, input().split())

_a = -1
A = []
ans = 0

for _ in range(M):
    a_ = int(input())
    if _a + 1 == a_:
        print(0)
        exit()
    _a = a_
    A.append(_a)

step = [] * N
step[0] = 1

for s in range(1, N + 1):
    if s in A:
        step[s] = 0
        continue
    if s == 1:
        step[s] = 1
        continue
    else:
        step[s] = (step[s - 1] + step[s - 2]) % 1000000007

print(step[N])
