N, M = list(map(int, input().split(" ")))
A = [1] * (N+1)
for i in range(M):
    A[int(input())] = -1
for i in range(2, N + 1):
    if(A[i] == -1):
        A[i] = 0
    else:
        A[i] = A[i-1] + A[i-2]
print(A[-1] % 1000000007)