MOD=10**9+7
N,M=map(int,input().split())
A=[int(input()) for _ in range(M)]
L=[-1 for _ in range(N)]
if 1 in A:
  L[0] = 0
else:
  L[0] = 1
if N>1:
  if 2 in A:
    L[1] = 0
  else:
    L[1]=L[0]+1
for i in range(2,N):
  if i+1 in A:
    L[i] = 0
  else:
    L[i]=L[i-1]+L[i-2]
print(L[-1]%MOD)