mod = 1000000007
n, m = map(int, input().split())
a = []
for _ in range(m):
    a.append(int(input()))
b = [0] * n
if a.count(1) == 0:
    b[0] = 1
else:
     b[0] = 0
if a.count(2) == 0:
    b[1] = b[0] + 1
else:
    b[1] = 0

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