
n,m  = map(int,input().split())
ln = []
mod_1 = 10**9 + 7
for i in range(m):
    ln.append(int(input()))
line = []
for i in range(n+1):
    if  i in ln:
        line.append(0)
    elif i == 0:
        line.append(1)
    elif i == 1:
        line.append(1)
    else:
        line.append((line[-1] + line[-2]) % mod_1)
print(line[-1])

