n, m = map(int, input().split())
a = []
for _ in range(m):
    a.append(int(input()))
    
s = [0 if n-i in a else -1 for i in range(n+1)] 
s[0] = s[1] = 1

for i in range(2, n+1):
    if s[i] == 0:
        continue
    if s[i-1] + s[i-2] <= 0:
        s[n] = 0
        break
    s[i] = (s[i-1] + s[i-2]) % 1000000007
    
print(s[n])