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

for i in range(2,N):
  A[i] = A[i-2] + A[i-1]
  if i+1 in a:
    A[i] = 0
  A[i] %= 1000000007
print(A[N-1])
    