n,m = map(int,input().split())
l = [int(input()) for _ in range(m)]
q = 10**9+7
memo = [0]*(n+1)
memo[0]=1
su = 0
if 1 in l:
  memo[1]=0
else:
  memo[1]=1

for i in range(2,n+1):
  if i in l:
    continue
  else:
    memo[i]=(memo[i-1]+memo[i-2])%q
print(memo[-1]%q)