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