N,M = [ int(x) for x in input().split() ]
a = [ int( input() ) for _ in range(M) ]
b = [ 0 for _ in range(N+1) ]

b[0] = 1
for i in range(N):
  for j in range(i+1, min(N+1,i+3)):
    if not j in a: b[j] += b[i]
  if b[i] == 0: continue

ans = b[N]
ans %= 1000000007

print(ans)
