n, m = map(int, input().split())
a = [0]*m
for _ in range(m):
    a[_] = int(input()) 
s = [1]*(n+1)

if 1 in a:
    s[1] = 0

for i in range(2,n+1):
    if i in a:
        s[i] = 0
        continue
    s[i] = (s[i-1] + s[i-2]) % (10**9+7)

print(s[-1])