MOD = 1000000007

n, m = [int(i) for i in input().split()]
a = [int(input()) for _ in range(m)]
steps = [0] * (n + 1)
steps[0] = 1

print(a)
for i in range(n):
    if i+1 < n+1 and i+1 not in a:
        steps[i+1] += steps[i]
    if i+2 < n+1 and i+2 not in a:
        steps[i+2] += steps[i]
ans = steps[-1] % MOD
print(ans)

