n, m = map(int, input().split())

memo = [-1] * (n + 1)
memo[0] = 1
memo[1] = 1
for i in range(m):
  memo[int(input())] = 0

def fib(x):
  if memo[x] == -1:
    memo[x] = fib(x-1) + fib(x-2)
  return memo[x]

def fib2(x):
  if x <= 1:
    return memo[x]
  else:
    for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
    return memo[x]

# print(fib2(n))
# print(memo)
print(fib2(n) % 1000000007) n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m memo = [-1] * (n + 1) memo [-1] * (n + 1) [-1] -1 n + 1 n 1 memo[0] = 1 memo[0] memo 0 1 memo[1] = 1 memo[1] memo 1 1 for i in range(m):
  memo[int(input())] = 0 i range(m) range m memo[int(input())] = 0 memo[int(input())] memo int(input()) int input() input 0 def fib(x):
  if memo[x] == -1:
    memo[x] = fib(x-1) + fib(x-2)
  return memo[x] fib if memo[x] == -1:
    memo[x] = fib(x-1) + fib(x-2)
   memo[x] == -1 memo[x] memo x -1 memo[x] = fib(x-1) + fib(x-2) memo[x] memo x fib(x-1) + fib(x-2) fib(x-1) fib x-1 x 1 fib(x-2) fib x-2 x 2 return memo[x] memo[x] memo x x x def fib2(x):
  if x <= 1:
    return memo[x]
  else:
    for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
    return memo[x]

# print(fib2(n))
# print(memo) fib2 if x <= 1:
    return memo[x]
  else:
    for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
    return memo[x]

# print(fib2(n))
# print(memo) x <= 1 x 1 return memo[x] memo[x] memo x for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
     i range(x - 1) range x - 1 x 1 if memo[i + 2] == 0:
        continue
       memo[i + 2] == 0 memo[i + 2] memo i + 2 i 2 0 continue memo[i + 2] = memo[i] + memo[i + 1] memo[i + 2] memo i + 2 i 2 memo[i] + memo[i + 1] memo[i] memo i memo[i + 1] memo i + 1 i 1 return memo[x] memo[x] memo x x x print(fib2(n) % 1000000007) print fib2(n) % 1000000007 fib2(n) fib2 n 1000000007 n, m = map(int, input().split()) map(int, input().split()) n m = map(int, input().split()) map(int, input().split()) m def fib(x):
  if memo[x] == -1:
    memo[x] = fib(x-1) + fib(x-2)
  return memo[x] def fib(x):
  if memo[x] == -1:
    memo[x] = fib(x-1) + fib(x-2)
  return memo[x] fib def fib2(x):
  if x <= 1:
    return memo[x]
  else:
    for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
    return memo[x]

# print(fib2(n))
# print(memo) def fib2(x):
  if x <= 1:
    return memo[x]
  else:
    for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
    return memo[x]

# print(fib2(n))
# print(memo) fib2 memo = [-1] * (n + 1) [-1] * (n + 1) memo
n, m = map(int, input().split())

memo = [-1] * (n + 1)
memo[0] = 1
memo[1] = 1
for i in range(m):
  memo[int(input())] = 0

def fib(x):
  if memo[x] == -1:
    memo[x] = fib(x-1) + fib(x-2)
  return memo[x]

def fib2(x):
  if x <= 1:
    return memo[x]
  else:
    for i in range(x - 1):
      if memo[i + 2] == 0:
        continue
      memo[i + 2] = memo[i] + memo[i + 1]
    return memo[x]

# print(fib2(n))
# print(memo)
print(fib2(n) % 1000000007)
