N,M=map(int,input().split())
now=0
MOD=10**9+7
p=[1,0]#0 humu  1 humazu
A=[int(input()) for i in range(M)]+[-1]
while now<N:
  if now==A[0]-1:
    p=[0,p[0]]
    A=A[1:]
  else:
    p=[p[0]+p[1], p[0]]
  now+=1
print(p[0]%MOD)