n,m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))

a.append(0)

dp = [0]*(n+1)
dp[0] = 1
if a[0] == 1:
    dp[2] = dp[0]+dp[1]
    l = 1
else:
    dp[1] = dp[0]
    dp[2] = dp[1]+dp[0]
    l = 0
    
for i in range(3,n+1):
    if a[l] != i:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        l += 1
        
print(dp[-1]%1000000007)