MOD = 10**9+7
N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]
if M>N//2+2:
  print(0)
  exit()
x = 0
y = 1
for i in range(N):
  if i+1 in a:
    z = 0
  else:
    z = x + y
  x = y
  y = z
print(z%MOD)
