n, m = map(int, input().split())
a = [int(input()) for i in range(m)]

f = [0] * (n + 1)
f[0] = 1

for i in range(1, n + 1):
    if i in a:
        continue
    f[i] = (f[i - 1] + f[i - 2]) % 1000000007

print(f[n])
