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

for i in range(N+1):
  if i == 0:
    memo[i] = 0
    continue
  if i == 1:
    memo[i] = 1
    continue
  memo[i] = memo[i-1] + memo[i-2]
  
ans = memo[N]
print(ans % 1000000007)


