n,m=map(int,input().split())
dp=[0]*(n+1)
f=[]
dp[0]=1

for i in range(m):
    t=int(input())
    f.append(t)

for i in range(1,n+1):
    if i in f:
        continue
    else:
        if dp[i-1] != 0:
            dp[i] += dp[i-1]
        if i > 1:
            if dp[i-2] != 0:
                dp[i] += dp[i-2]

print(dp[-1]%1000000007)