N, M = map(int, input().split())

stairs = []

for i in range(M):
    stairs.append(int(input()))
path = []
path.extend([1, 1])
# caluclate from N-2 step (second last)
if N > 3:
    for n in range(2, N):
        if N - n not in stairs:
            path.append(path[n-2] + path[n-1])
        else:
            path.append(0)
    print((path[-1] + path[-2]) % (10**9+7)) 
elif N < 2:
    count = 0
    for i in range(N):
        count += path[i]
    print(count)