N, M = [int(x) for x in input().split(' ')]
brokens = []
for _ in range(M):
  brokens.append(int(input()))
  
memo = {}
def count_climbable(a, end, count):
  if a in memo:
    return memo[a]
  elif a is end:
    return 1
  elif a > end:
    return 0
  elif a in brokens:
    return 0
  else:
    memo[a] = count_climbable(a+1, end, count)+count_climbable(a+2, end, count)
    return memo[a]
  
print(count_climbable(0, N, 0) % 1000000007)