n,m=map(int,input().split())
out=[]
for i in range(m):
  out.append(int(input()))
def stairs(n):
  memo=["a"]*n
  def count(n):
    if n in out:
      return 0
    elif n<=2:
      return n
    else memo[n-1]!="a":
      return memo[n-1]%(10e9+7)
    return (memo[n-2]+memo[n-3])%(10e9+7)
  return count(n)
print(stairs(n)%(10e9+7))