n,m = map(int,input().split())
o = [int(input()) for _ in range(m)]
print(o)
mod = (10**9)+7
dp = [1]+[0]*(n)
flag1 = False

for i in range(n):
  if i+1 not in o:
    dp[i+1] = dp[i] + dp[i-1]
  else:
    dp[i+1] = 0
  #print(i,dp)
#print(dp)
print(dp[-1]%mod)