from functools import lru_cache
dan,ana=map(int,input().split())
l={int(input()) for _ in range(ana)}
@lru_cache(maxsize=100000000000000)
def f(x):
  global l
  if x in l:return 0
  elif x==1:return 1
  elif x==2:return f(1)+1
  else:return (f(x-1)+f(x-2))%(10**9+7)

print(f(dan))
