mod = 10**9+7
n,m = map(int,input().split())
lst = [int(input()) for _ in range(m)]
dp = [0] * (n+2)

for i in range(n):
    if i in lst:
        continue
    if i==1:
        dp[i] += 1
    if i==2:
        dp[i] += 1
    if i+1 not in lst:
        dp[i+1] += dp[i]
    if i+2 not in lst:
        dp[i+2] += dp[i]

print(dp[n]%mod)