n,m = map(int,input().split())
dp = [1]*(n+2) 

mod = 10**9 + 7
for i in range(m):
    a = int(input())
    dp[a-1] = 0

    
for i in range(2,n+2):
    if dp[i] == 0:
        continue
    else:
        dp[i] = (dp[i-1] + dp[i-2])%mod

print(dp[n-1])