n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]
mod = (10**9)+7
ans = [1,0] if 1 in a else [1,1]
for i in range(2,n+1):
  if i in a:
    ans.append(0)
  else:
    k = (ans[-1]%mod+ans[-2]%mod)%mod
    ans.append(k)
print(ans[n])
    
  
  
  
  