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