n,m=map(int,input().split())
a = [int(input()) for i in range(m)]
broken = set(a)
dp=[0]*(n-1)+[1]+[1]
mod = 10**9 + 7

for i in range(n-2,-1,-1):
  if i in broken:
    continue
  dp[i]=dp[i+1]+dp[i+2]
  dp[i]%=mod
print(dp[0])