def dfs(i):
    global kaidan
#    print(i, kaidan)
    if(kaidan[i] == -1): return 0
    if(kaidan[i] > 0):
        return kaidan[i]
    if(i == N):
        kaidan[i] = 1
        return kaidan[i]
    if(i > N): return 0
    kaidan[i] += dfs(i+1)
    kaidan[i] += dfs(i+2)
    return kaidan[i]

N, M = map(int, input().split())
kaidan = [0 for i in range(N+2)]
#print(kaidan)

for i in range(M):
    idx = int(input())
    kaidan[idx] = -1

dfs(0)
print(kaidan[0] % 1000000007)
