n,m = map(int,input().split())

mod = 10**9+7
dp = [-1]*(n+1)
dp[0]= 1
for i in range(m):
    a = int(input())
    dp[a-1] = 0
#print(dp)
#dp[1] = 1
#dp[2] = 2
for i in range(1,n+1):
    if i <= 1:
        dp[i] = dp[i-1]+1
    elif i>=2 :
        dp[i] = (dp[i-1]+ dp[i-2])%mod
        #print(dp)
print(dp[n])