def rec(i, bs, ngs):
    if bs[i] is None:
        if ngs[i]:
            bs[i] = 0
        elif i == 0 or i == 1:
            bs[i] = 1
        else:
            bs[i] = (rec(i-1, bs, ngs) + rec(i-2, bs, ngs)) % 1000000007
    return bs[i]


N, M = map(int, input().split())
ngs = [False] * int(1e5+1)
for _ in range(M):
    ngs[int(input())] = True

bs = [None] * int(1e5+1)
ans = rec(N, bs, ngs)
print(ans)
