def up_stairs(now):
  
  if now == N or (now + 1) == N:
    return 1
  if now > N:
    return 0
  if (now in a):
    return 0
  
  if (now + 1) in a:
    return up_stairs(now + 2)
  elif (now + 2) in a:
    return up_stairs(now + 1)
  else:
    return up_stairs(now + 1) + up_stairs(now + 2)


N,M = (int(x) for x in input().split())

a = []
for i in range(M):
  a.append(int(input()))

print(int(up_stairs(0) % 1000000007))  