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

x = 1
y = 1
for i in range(1, n+1):
  if i in a:
    if i == 1:
      y = 0
    else:
      x = y
      y = 0
  else:
    if i != 1:
      tmp = x + y
      x = y
      y = tmp

print(y % 1000000007)