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



