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