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