
[N,M] = list(map(int,input().split()))
a = []
for i in range(M):
    a.append(int(input()))

#print(a)
dp = [0] * (N+1)
dp[0]=1
if a[0]!=1:
    dp[1]=1
#dp[1]=1
j=0
for i in range(1,N+1):
    if M!=0:
        if i==a[j]:
            dp[i] = 0
            j+=1
            if j==len(a):
                j=0

        else:
            dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[i-1] + dp[i-2]

print(dp[-1] % 1000000007)