n, m = map(int, input().split())
a = [int(input()) for x in range(m)]

l = [1]
for i in range(1, n+1):
  if len(l) == 2:
    tmp = l[0]
    tmp1 = l[1]
    if i in a:
      if tmp1 == 0:
        print(0)
        exit()
      l[0] = tmp1
      l[1] = 0
    else:
      l[0] = tmp1
      l[1] = tmp + tmp1
  else:
    if i in a:
      l.append(0)
    else:
      l.append(1)

print(l[-1] % 1000000007)
