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

f = [0] * (n + 1)

f[0] = 1

if a[0] == 1:
    f[1] = 0
else:
    f[1] = 1

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

print(f[n] % 1000000007)
