n,m,*L = map(int,open(0).read().split())
mod = 10**9+7

dp = [0]*(n+1)
if 1 in L:
    dp[0] = 0
    dp[1] = 1
elif 1 not in L:
    dp[0] = 1
    dp[1] = 2

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