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