# input
n, m = map(int, input().split())

out_list = []
result_list = [1]
for x in range(m):
    out_list.append(int(input()))

for x in range(1, n+1):
  if x in out_list:
    result_list.append(0)
  elif x == 1:
    result_list.append(result_list[x - 1])
  else:
    result_list.append(result_list[x-1] + result_list[x-2])

print(result_list[n] % 1000000007)