def www(N,l):
  return True if N in l else False

N,M =map(int,input().rstrip().split(" "))
ans = [0 for _ in range(N + 3)]
ans[0] = 1
m = []
mc = 0
flag = True
for _ in range(M):
  m.append(int(input()))
  if m[len(m) - 1] == m[len(m) -2] + 1:
    print(0)
    flag = False
m.append(0)
if flag:
  for i in range(0,N + 1):
    if www(i + 1,m) == False:
      ans[i + 1] += ans[i]
      ans[i + 1] %= 1000000007
    if www(i + 2,m) == False:
      ans[i + 2] += ans[i]
      ans[i + 2] %= 1000000007
print(ans[N])