n, m = list(map(int, input().split()))
# a, b, c = list(map(int, input().split()))
a = []
for i in range(m):
    a.append(int(input()))

mod = pow(10, 9)+7
point = [0]*(n+1)
point[0] = 1
if a[0] != 1:
    point[1] = 1

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

# print(point)
print(point[-1] % mod)
