N,M = list(map(int, input().split()))

lst1 = [int(input()) for i in range(M)]

def Fib(n, lst):    
    if n == 1:
      if (n in lst):
        return 0
      else:
        return 1
    elif n == 2:
      if (n in lst):
        return Fib(1, lst1)
      else:
        return Fib(1,lst1) + 1
    else:
      if (n in lst):
        return 0
      else:
        return Fib(n-1,lst1)+Fib(n-2,lst1)

lst2 = []
lst2 = [Fib(n, lst1) for n in range(1,N+1)]
print(lst2[-1] % 1000000007)