MOD = 10**9+7
N, M = map(int, input().split())
broken = [int(input())for _ in range(M)]

dp = [0 for _ in range(N+2)]
dp[N+1] = 0
dp[N] = 1

for i in reversed(range(N)):
    if i not in broken:
        dp[i] = dp[i+1] + dp[i+2]
        dp[i] %= MOD
        
print(dp[0])
