N, M = map(int, input().split())

a_list = [int(input()) for i in range(M)]

step_route = [0] * (N+1)

step_route[0] = 1
step_route[1] = 1

for j in range(N+1):  
  if j >= 2:
    step_route[j] = step_route[j-1] + step_route[j-2]
  if j in a_list:
    step_route[j] = 0
    
print(step_route[N] % 1000000007)