n,m = map(int,input().split())
b = [int(input()) for _ in range(m)]
A = [0,1]
if 0 in b:
  print(0)
else:
  for i in range(1,n+1):
    if i in b:
      A.append(0)
    else:
      A.append( (A[-1]+A[-2]) % (10**9+7) )
  print(A[-1])