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

dp=[-1]*(n+1)
dp[0]=1

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

print(calc(n)%1000000007)
