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

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

nums = set(range(N)) - set(skip)

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

for i in nums:
    steps[i+1] = (steps[i+1] + steps[i]) % P
    steps[i+2] = (steps[i+2] + steps[i]) % P

print steps[N]
