n, m = map(int, input().split())

a = [0] * m

for i in range(m):
    a[i] = int(input())

div = 10 ** 9 + 7
f = [0] * n

f[0] = 1
f[1] = 2

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

print(f[n - 1])
