N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

mod = int(1e9+7)

if N == 1:
  print(1)
  exit()

solver = [1]

## 1段目の処理
if A[0] == 1:
  solver.append(0)
else:
  solver.append(1)

for i in range(2,N+1): ## i段目の処理
  if i in A:
    solver.append(0)
  else:
    var = (solver[i-2] + solver[i-1]) % mod
    solver.append(var)
    
print(solver[-1])