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

l = list(range(1, n+1))
divider = 10**9 + 7
ans = [0]*(n + 1)
ans[0] = 1
ans[1] = 1

for i in range(m):
    inp = int(input())
    l.remove(inp)
    if inp == 1:
        ans[1] = 0

if 1 in l:
    l.remove(1)

for i in l:
    ans[i] = ans[i-1] + ans[i-2]
    
   
print(ans[n] % divider)