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

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