N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]

def fib(n):  
    if (n==0 or n==1):return 1
    if n in a:
      return 0
    elif fib(n-1) + fib(n-2) < 1000000007:
      return (fib(n-1) + fib(n-2))
    else:
      return (fib(n-1) + fib(n-2)) % 1000000007

print(fib(N))