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] == 0:
    return 0
  if memo[x] > 0:
    return memo[x]
  else:
    memo[x] = fib(x-1) + fib(x-2)
    return memo[x]

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