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

dp=[0]*(N+1)

for i in range(N):
  if i+1 not in a:
    dp[i+1]+=dp[i]
  if i+2 < N and i+2 not in a:
    dp[i+2]+=dp[i]
  
print(dp[-1]%1000000007)