n,m=map(int,input().split())
mList=[int(input()) for i in range(m)]

#dp=[0]*(n+1)
dp=[-1]*(n+1)
dp[0]=1
if 1 not in mList:
  dp[1]=1

#for i in range(2,n+1):
#  if i in mList: continue
#  dp[i]+=dp[i-1]
#  dp[i]+=dp[i-2]
#  dp[i]%=1000000007

def calc(i):
  if dp[i]!=-1: return dp[i]
  if i in mList:
    dp[i]=0
    return dp[i]
  dp[i]=calc(i-1)+calc(i-2)
  dp[i]%=1000000007
  return dp[i]

print(calc(n))
#print(dp[n])
