Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = []
for i in range(M):
  danger.append(int(input()))
l = [1, 1]
for i in range(1, N):
  if i in danger:
    l[1] = 0
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N in danger:
  l[1] = 0
print(l[1] % Num)