def rec(n):
  if n < 0:
    return 0
  if n in b:
    return 0
  if n == 0:
    return 1  
  if n in memo:
    return memo[n]
  
  tmp = rec(n-1) + rec(n-2)
  memo[n] = tmp
  return tmp
  

N, M = map(int, input().split())
memo = {}
b = {}
for i in range(M):
  val = int(input())
  b[val] = 1

ans = rec(N)
print(ans % 1000000007)


