N,M=map(int, input().split()) 
a=[0]*M
for i in range(M):
  a[i]=int(input())

dp=[0]*(N+1)
dp[0]=1
if 1 in a:
  dp[1]=0
else:
  dp[1]=1
  
for j in range(2,N+1):
  if j in a:
    dp[j]=0
  else:
    dp[j]=dp[j-2]+dp[j-1]

#print(dp)
print(dp[-1]%1000000007)