N, M = map(int, input().split())
A = list()
for i in range(M):
  A.append(int(input()))
ans = [0] * (N+1)
for i in range(N+1):
  if(i not in A):
    if(i == 0 or i == 1):
      ans[i] = 1
    else:
      ans[i] = (ans[i-1]+ans[i-2])%1000000007
print(ans[N])