line = input()
X, Y = [int(n) for n in line.split()]

broken_steps = set()
for _ in range(Y):
    line = input()
    broken_steps.add(int(line))

if 1 in broken_steps:
    stairs = [0]
else:
    stairs = [1]

if 2 in broken_steps:
    stairs.append(0)
else:
    stairs.append(2)

for i in range(2, X):
    number_of_steps = 0
    if i+1 not in broken_steps:
        number_of_steps = stairs[i - 1] + stairs[i-2]
    stairs.append(number_of_steps)
predicted_value = stairs[X-1]
print(predicted_value % 1000000007)