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

f = [0]*(n+3)
f[0] = 1
endf = 0
for i in range(1,n+1):
    if i in xx:
        endf += 1
        print('skip',i)
        if endf ==2:
            print(0)
            break
        continue
    else :
        if endf == 1:
            endf = 0
            f[i] = f[i-2]
        else :
            endf = 0
            f[i] = f[i-1] + f[i-2]
else:
    print(f[n]%1000000007)