n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
dp=[1]*(n+5)
dp[0]=0
dp[1]=0
if n==1:
    print(1)
if n==2:
    if m==1:
        print(1)
    else:
        print(2)
else:
    for i in range(1,n+2):
        if i in a:
            dp[i+2]=0
        else:
            dp[i+2]=dp[i+1]+dp[i]
print(dp[n+2]%(10**9+7))
