def step(N,M):
    if N == 0:
        return 1
    if N < 0:
        return 0
    if N - 1 in M and N - 2 in M:
        return 0
    if N - 1 in M:
        return step(N-2, M) % 1000000007
    if N - 2 in M:
        return step(N-1,M) % 1000000007
    return (step(N - 1, M) + step(N - 2, M)) % 1000000007


N, M = map(int, input().split())
a = []
for i in range(M):
    a.append(int(input()))

print(step(N, a))