N,M = map(int,input().split())
A = []
MOD = 1000000007
for _ in range(M):
  a = int(input())
  A.append(a)
DP = [0]*(N+1)
DP[0] = 1
DP[1] = 1
if 1 in A:
  DP[1] = 0
for i in range(1,N):
  DP[i+1] = DP[i-1]+DP[i]
  if i+1 in A:
    DP[i+1] = 0
print(DP[-1]%MOD)