n,m = map(int,input().split())
lia = [int(input()) for _ in range(m)]
cnt = 0
li = [0] * (n+1)
mod = 1000000007

for i in range(n+1):
    if i == 0 or i == 1:
        if lia[cnt] == i:
            li[i] = 0
            if cnt < m-1:
                cnt += 1
        else:
            li[i] = 1
    else:
        if lia[cnt] == i:
            li[i] = 0
            if cnt < m-1:
                cnt += 1
        else:
            li[i] = li[i-1] + li[i-2]
    li[i] %= mod

print(li[n])
