n, m = map(int, input().split())
broken_list = [int(input()) for _ in range(m)]

a = 1
b = 0 if 1 in broken_list else 1

if n == 1:
  print(1)
  exit()
if n == 2:
  if broken_list:
    print(1)
  else:
    print(2)
  exit()
  
for i in range(2, n+1):
  if i in broken_list:
    a, b = b, 0
  else:
    a, b = b, a + b

print(b%1000000007)