z=list(map(int,input().split()))
n,m,b=z[0],z[1],[1]
a=[int(input()) for i in range(m)]
if a[0]==1:
    b.append(0)
    c=1
else:
    b.append(1)
    c=0
for i in range(n-1):
    if c<len(a):
        if i+2==a[c]:
            b.append(0)
            c+=1
        else:
            b.append(b[i]+b[i+1])
    else:
        b.append(b[i]+b[i+1])
print(b[-1]%1000000007)