n, m = [int(i) for i in input().split(" ")]
s = [int(input()) for _ in range(m)]

divider = 10**9 + 7
ans = [0]*(n + 1)
ans[0] = 1
ans[1] = 1

if 1 in s:
    ans[1] = 0
        
for i in range(2, n+1):
    
    if i in s:
        continue
    else:
        ans[i] = ans[i-1] + ans[i-2]
    
   
print(ans[n] % divider)