# fx = fx-1 + fx-2
N,M = map(int,input().split())
aa = [int(input()) for _ in range(M)]

oks = [(i not in aa) for i in range(N+1)]+[False]
dp = [0]*(N+1)
dp[0]=1
# print(oks)
MOD = 10**9+7

for i in range(N):
    for j in [1,2]:
        if oks[i+j]:
            dp[i+j] += dp[i]
            dp[i+j] %= MOD

print(dp[N])