n,m = map(int, input().split())
a = [int(input()) for _ in range(m)]

large = 10**9 +7
count = [0]*(n+1)
itr = 0
count[0] = 1

if m >0 and a[0] != 1 :
    count[1] = 1
else:
    count[1] = 0
    itr = 1
if n >=2:
    for i in range(2,n+1):
        if m > 0 and itr<len(a) and a[itr] == i:
            itr +=1
            continue
        else:
            count[i] = (count[i-1] + count[i-2])%large

print(count[n])


