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

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

def fib(n):
  a, b = 1, 2
  for i in range(1,n+1):  
    if (i == 1):
      if (i in lst1):
        a, b = 0, 1
    else:
      if (i in lst1):
        a, b = 0, a
      else:
        a, b = b, b+a
  return a

print(fib(N)  % 1000000007)