n, m = map(int, input().split())
l = {int(input()) for _ in range(m)}
p = 10**9+7
f = [0] * (n + 1)
f[0], f[1] = 1, 0 if 1 in l else 1
for i in range(1, n+1):
    if not i in l:
        f[i] = (f[i - 1] + f[i - 2]) % p

print(f[n])
