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

stair = [0 for _ in range(N + 1)]
stair[0] = 1
stair[1] = 1

for i in range(2, N + 1):
  if i in broken:
    continue
  else:
    stair[i] = stair[i - 2] + stair[i - 1]

print (stair[N] % 1000000007)